mirror of
https://github.com/discourse/discourse.git
synced 2025-06-22 23:22:50 +08:00
DEV: Extensively use startsWith()
(#17540)
This commit is contained in:
@ -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);
|
||||
}
|
||||
|
||||
|
Reference in New Issue
Block a user