diff options
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 22 |
1 files changed, 9 insertions, 13 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 9752124..d4b7d0f 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -760,7 +760,8 @@ Handlebars.JavaScriptCompiler = function() {}; // // Push an expression onto the stack push: function(expr) { - return this.pushStack(expr, true); + this.inlineStack.push(expr); + return expr; }, // [pushLiteral] @@ -955,20 +956,15 @@ Handlebars.JavaScriptCompiler = function() {}; return this.push(new Literal(item)); }, - pushStack: function(item, inline) { - if (inline) { - this.inlineStack.push(item); - return item; - } else { - this.flushInline(); + pushStack: function(item) { + this.flushInline(); - var stack = this.incrStack(); - if (item) { - this.source.push(stack + " = " + item + ";"); - } - this.compileStack.push(stack); - return stack; + var stack = this.incrStack(); + if (item) { + this.source.push(stack + " = " + item + ";"); } + this.compileStack.push(stack); + return stack; }, replaceStack: function(callback) { |