Allow execution of helpers on the context

Fixes #285
This commit is contained in:
kpdecker
2013-05-30 15:46:00 -04:00
parent 17659b9720
commit d7b345b2da
3 changed files with 12 additions and 2 deletions
+2 -1
View File
@@ -866,8 +866,9 @@ JavaScriptCompiler.prototype = {
this.context.aliases.helperMissing = 'helpers.helperMissing';
var helper = this.lastHelper = this.setupHelper(paramSize, name, true);
var nonHelper = this.nameLookup('depth' + this.lastContext, name, 'context');
this.push(helper.name);
this.push(helper.name + ' || ' + nonHelper);
this.replaceStack(function(name) {
return name + ' ? ' + name + '.call(' +
helper.callParams + ") " + ": helperMissing.call(" +