diff --git a/lib/tput.js b/lib/tput.js index 909769d..4f3b41f 100644 --- a/lib/tput.js +++ b/lib/tput.js @@ -617,7 +617,7 @@ Tput.prototype._compile = function(val, key) { } function echo(c) { - expr('out += (' + c + ')'); + expr('out += (' + c + ' || "")'); } function print(c) { @@ -1002,7 +1002,7 @@ Tput.prototype._compile = function(val, key) { // TODO: Make this less ridiculous. // Optimize - // ... out += ("foo");return out.join(""); + // ... out += ("foo");return out; // To: // return "foo"; v = code.split(/out = "";out \+= \(|\);return out/);