summaryrefslogtreecommitdiffstats
path: root/lib/handlebars/compiler/compiler.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/handlebars/compiler/compiler.js')
-rw-r--r--lib/handlebars/compiler/compiler.js3
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/handlebars/compiler/compiler.js b/lib/handlebars/compiler/compiler.js
index f174393..4537386 100644
--- a/lib/handlebars/compiler/compiler.js
+++ b/lib/handlebars/compiler/compiler.js
@@ -532,7 +532,8 @@ Handlebars.JavaScriptCompiler = function() {};
lookup: function(name) {
var topStack = this.topStack();
- this.source.push(topStack + " = " + topStack + " ? " + this.nameLookup(topStack, name, 'context') + " : " + topStack + ";");
+ this.source.push(topStack + " = (" + topStack + " == null || " + topStack + " == undefined || " + topStack + " == false ? " +
+ topStack + " : " + this.nameLookup(topStack, name, 'context') + ");");
},
pushStringParam: function(string) {