We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent bf201a6 commit 94e7004Copy full SHA for 94e7004
1 file changed
lib/handlebars/compiler/compiler.js
@@ -779,11 +779,13 @@ Handlebars.JavaScriptCompiler = function() {};
779
this.context.aliases.helperMissing = 'helpers.helperMissing';
780
781
var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
782
- this.useRegister('foundHelper');
783
784
- this.pushStack("(foundHelper = " + helper.name + ") ? foundHelper.call(" +
785
- helper.callParams + ") " + ": helperMissing.call(" +
786
- helper.helperMissingParams + ")");
+ this.pushStack(helper.name, true);
+ this.replaceStack(function(name) {
+ return name + ' ? ' + name + '.call(' +
+ helper.callParams + ") " + ": helperMissing.call(" +
787
+ helper.helperMissingParams + ")";
788
+ }, true);
789
},
790
791
// [invokeKnownHelper]
0 commit comments