diff options
author | Tommy Messbauer <tommy@vast.com> | 2012-11-26 10:26:15 -0600 |
---|---|---|
committer | Tommy Messbauer <tommy@vast.com> | 2012-11-26 10:26:15 -0600 |
commit | db975b42a0ae295b6716700900a4724d97f1d9c6 (patch) | |
tree | 9d33e5c1ab8c279698cb58894711ac6f1282ec67 /lib/handlebars/compiler/compiler.js | |
parent | 79632184953284603b64a3179d087ebcda9d0ab6 (diff) | |
parent | bd0490145438e8f9df05abd2f4c25687bac81326 (diff) | |
download | handlebars.js-db975b42a0ae295b6716700900a4724d97f1d9c6.zip handlebars.js-db975b42a0ae295b6716700900a4724d97f1d9c6.tar.gz handlebars.js-db975b42a0ae295b6716700900a4724d97f1d9c6.tar.bz2 |
Merged upstream master and ran unit tests
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 97a87f0..6dc43d6 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -646,7 +646,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; }); }, @@ -791,7 +791,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] |