REFACTOR: Remove Ember.get

This commit is contained in:
Robin Ward
2019-10-31 16:28:10 -04:00
parent 89f602f66b
commit 640a05c4ee
31 changed files with 84 additions and 56 deletions

View File

@ -1,4 +1,4 @@
import { get } from "discourse-common/lib/raw-handlebars";
import { rawGet } from "discourse-common/lib/raw-handlebars";
export function htmlHelper(fn) {
return Ember.Helper.helper(function(...args) {
@ -39,7 +39,7 @@ function resolveParams(ctx, options) {
) {
params[k] = hash[k];
} else if (type === "ID" || type === "PathExpression") {
params[k] = get(ctx, hash[k], options);
params[k] = rawGet(ctx, hash[k], options);
}
});
} else {
@ -59,7 +59,7 @@ export function registerUnbound(name, fn) {
options.types &&
(options.types[i] === "ID" || options.types[i] === "PathExpression")
) {
properties[i] = get(this, properties[i], options);
properties[i] = rawGet(this, properties[i], options);
}
}