Render false literal as “false”

Fixes #827
This commit is contained in:
kpdecker
2014-08-25 23:35:43 -05:00
parent 3c869866c8
commit 4f01f650dc
4 changed files with 13 additions and 3 deletions
@@ -293,7 +293,7 @@ JavaScriptCompiler.prototype = {
// when we examine local
this.flushInline();
var local = this.popStack();
this.pushSource("if(" + local + " || " + local + " === 0) { " + this.appendToBuffer(local) + " }");
this.pushSource('if (' + local + ' != null) { ' + this.appendToBuffer(local) + ' }');
if (this.environment.isSimple) {
this.pushSource("else { " + this.appendToBuffer("''") + " }");
}