A platform for community discussion. Free, open, simple.
FIX: Allow subexpressions in raw handlebars helpers
David Taylorbabd80dfd1e3
diff --git a/app/assets/javascripts/discourse-common/lib/helpers.js.es6 b/app/assets/javascripts/discourse-common/lib/helpers.js.es6index bbaaf6200a1..907ae24d8c9 100644--- a/app/assets/javascripts/discourse-common/lib/helpers.js.es6+++ b/app/assets/javascripts/discourse-common/lib/helpers.js.es6@@ -32,7 +32,11 @@ function resolveParams(ctx, options) {if (options.hashTypes) {Object.keys(hash).forEach(function(k) {const type = options.hashTypes[k];- if (type === "STRING" || type === "StringLiteral") {+ if (+ type === "STRING" ||+ type === "StringLiteral" ||+ type === "SubExpression"+ ) {params[k] = hash[k];} else if (type === "ID" || type === "PathExpression") {params[k] = get(ctx, hash[k], options);