From 3ae01237beef536fd201f05bfad99986aae1d324 Mon Sep 17 00:00:00 2001 From: Christopher Jeffrey Date: Thu, 18 Jul 2013 18:06:53 -0500 Subject: [PATCH] fix tput string concatenation. --- lib/tput.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) 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/);