diff options
author | kpdecker <kpdecker@gmail.com> | 2012-12-02 13:40:37 -0800 |
---|---|---|
committer | kpdecker <kpdecker@gmail.com> | 2012-12-02 13:40:37 -0800 |
commit | eabcc8a002789f2b074eef3c991c7f458188d2f9 (patch) | |
tree | 2e7cfb71d9d21d53529c9d8ffc822201d0a45a8f /lib/handlebars/compiler/compiler.js | |
parent | 8e9bd6742f8c81d058ec26d8c692782b59168dc6 (diff) | |
parent | bd0490145438e8f9df05abd2f4c25687bac81326 (diff) | |
download | handlebars.js-eabcc8a002789f2b074eef3c991c7f458188d2f9.zip handlebars.js-eabcc8a002789f2b074eef3c991c7f458188d2f9.tar.gz handlebars.js-eabcc8a002789f2b074eef3c991c7f458188d2f9.tar.bz2 |
Merge branch 'master' of https://github.com/wycats/handlebars.js
Conflicts:
package.json
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 108d055..7578dd2 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -642,7 +642,7 @@ Handlebars.JavaScriptCompiler = function() {}; this.context.aliases.functionType = '"function"'; this.replaceStack(function(current) { - return "typeof " + current + " === functionType ? " + current + "() : " + current; + return "typeof " + current + " === functionType ? " + current + ".apply(depth0) : " + current; }); }, @@ -787,7 +787,7 @@ Handlebars.JavaScriptCompiler = function() {}; var nextStack = this.nextStack(); this.source.push('if (foundHelper) { ' + nextStack + ' = foundHelper.call(' + helper.callParams + '); }'); - this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '() : ' + nextStack + '; }'); + this.source.push('else { ' + nextStack + ' = ' + nonHelper + '; ' + nextStack + ' = typeof ' + nextStack + ' === functionType ? ' + nextStack + '.apply(depth0) : ' + nextStack + '; }'); }, // [invokePartial] |