fix tput string concatenation.

This commit is contained in:
Christopher Jeffrey 2013-07-18 18:06:53 -05:00
parent b8e0fafaeb
commit 3ae01237be
1 changed files with 2 additions and 2 deletions

View File

@ -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/);