diff options
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r-- | lib/handlebars/compiler/compiler.js | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js index 0679135..5f4dca6 100644 --- a/lib/handlebars/compiler/compiler.js +++ b/lib/handlebars/compiler/compiler.js @@ -552,7 +552,9 @@ Handlebars.JavaScriptCompiler = function() {}; this.context.aliases.helperMissing = 'helpers.helperMissing'; this.context.aliases.undef = 'void 0'; this.source.push("else if(" + id + "=== undef) { " + nextStack + " = helperMissing.call(" + helperMissingString + "); }"); - this.source.push("else { " + nextStack + " = " + id + "; }"); + if (nextStack !== id) { + this.source.push("else { " + nextStack + " = " + id + "; }"); + } } }); }, |