FIX: Allow subexpressions in raw handlebars helpers
Helpers registered via `registerUnbound` did not receive parameters if they were subexpressions. For example: `{{helper1 key=(helper2 value)}}`
This commit is contained in:
parent
95b5c5898e
commit
babd80dfd1
|
@ -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);
|
||||
|
|
Loading…
Reference in New Issue