Skip to content

Commit

Permalink
only output "" when == null
Browse files Browse the repository at this point in the history
  • Loading branch information
tj committed Mar 4, 2011
1 parent 213c51c commit 2169260
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/compiler.js
Expand Up @@ -234,7 +234,7 @@ Compiler.prototype = {
// Buffer code
if (code.buffer) {
var val = code.val.trimLeft();
val = '(' + val + ') || ""';
val = '(' + val + ') == null ? "" : (' + val + ')';
if (code.escape) val = 'escape(' + val + ')';
this.buf.push("buf.push(" + val + ");");
} else {
Expand Down

0 comments on commit 2169260

Please sign in to comment.