summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/javascript-compiler.js
diff options
context:
space:
mode:
authorkpdecker <kpdecker@gmail.com>2013-10-14 21:23:06 -0500
committerkpdecker <kpdecker@gmail.com>2013-10-14 21:30:58 -0500
commit4fda71364ede88eaff126ac3eeb18496f10f8725 (patch)
tree5ccdbaaa64180f63dace5ad93b2e91075dc877b2 /lib/handlebars/compiler/javascript-compiler.js
parent3702efee5b65d9dfc483895944fd90702ca41dc5 (diff)
downloadhandlebars.js-4fda71364ede88eaff126ac3eeb18496f10f8725.zip
handlebars.js-4fda71364ede88eaff126ac3eeb18496f10f8725.tar.gz
handlebars.js-4fda71364ede88eaff126ac3eeb18496f10f8725.tar.bz2
Pass options hash to context function exec
Fixes #599
Diffstat (limited to 'lib/handlebars/compiler/javascript-compiler.js')
-rw-r--r--lib/handlebars/compiler/javascript-compiler.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/javascript-compiler.js b/lib/handlebars/compiler/javascript-compiler.js
index a81a99c..b631372 100644
--- a/lib/handlebars/compiler/javascript-compiler.js
+++ b/lib/handlebars/compiler/javascript-compiler.js
@@ -499,7 +499,7 @@ JavaScriptCompiler.prototype = {
var nextStack = this.nextStack();
this.source.push('if (' + nextStack + ' = ' + helperName + ') { ' + nextStack + ' = ' + nextStack + '.call(' + helper.callParams + '); }');
- this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.apply(depth0) : ' + nextStack + '; }');
+ this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.call(depth0, options) : ' + nextStack + '; }');
},
// [invokePartial]