DEV: Extensively use startsWith() (#17540)

This commit is contained in:
Jarek Radosz
2022-07-17 20:16:39 +02:00
committed by GitHub
parent 6a4a7b1d88
commit 5f7163b5bb
16 changed files with 34 additions and 35 deletions

View File

@ -25,7 +25,7 @@ export function registerRawHelpers(hbs, handlebarsClass) {
let firstContext = options.contexts[0];
let val = firstContext[context];
if (context.toString().indexOf("controller.") === 0) {
if (context.toString().startsWith("controller.")) {
context = context.slice(context.indexOf(".") + 1);
}