diff --git a/lib/Connection.js b/lib/Connection.js index 778f655..d0aa3f4 100644 --- a/lib/Connection.js +++ b/lib/Connection.js @@ -1359,6 +1359,7 @@ Connection.prototype._resTagged = function(info) { }); } else { req.cbargs.unshift(err); + req.cbargs.push(info.textCode); req.cb && req.cb.apply(this, req.cbargs); } diff --git a/lib/Parser.js b/lib/Parser.js index 7efa3ab..80ed166 100644 --- a/lib/Parser.js +++ b/lib/Parser.js @@ -300,7 +300,7 @@ function parseTextCode(text, literals) { if (r.length === 1) return r[0]; else - return { key: r[0], val: r[1] }; + return { key: r[0], val: r.length === 2 ? r[1] : r.slice(1) }; } function parseESearch(text, literals) {