Use stack rather than register for invoke lookup
This commit is contained in:
@@ -779,11 +779,13 @@ Handlebars.JavaScriptCompiler = function() {};
|
||||
this.context.aliases.helperMissing = 'helpers.helperMissing';
|
||||
|
||||
var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
|
||||
this.useRegister('foundHelper');
|
||||
|
||||
this.pushStack("(foundHelper = " + helper.name + ") ? foundHelper.call(" +
|
||||
helper.callParams + ") " + ": helperMissing.call(" +
|
||||
helper.helperMissingParams + ")");
|
||||
this.pushStack(helper.name, true);
|
||||
this.replaceStack(function(name) {
|
||||
return name + ' ? ' + name + '.call(' +
|
||||
helper.callParams + ") " + ": helperMissing.call(" +
|
||||
helper.helperMissingParams + ")";
|
||||
}, true);
|
||||
},
|
||||
|
||||
// [invokeKnownHelper]
|
||||
|
||||
Reference in New Issue
Block a user