Parser: check untagged list-style responses for no results

Example: * SEARCH
fork
mscdex 12 years ago
parent bad60cf479
commit 132cd1e13a

@ -201,12 +201,16 @@ Parser.prototype._resUntagged = function() {
|| type === 'search'
|| type === 'capability'
|| type === 'sort') {
if (m[5][0] === '(')
val = RE_LISTCONTENT.exec(m[5])[1].split(' ');
else
val = m[5].split(' ');
if (type === 'search' || type === 'sort')
val = val.map(function(v) { return parseInt(v, 10); });
if (m[5]) {
if (m[5][0] === '(')
val = RE_LISTCONTENT.exec(m[5])[1].split(' ');
else
val = m[5].split(' ');
if (type === 'search' || type === 'sort')
val = val.map(function(v) { return parseInt(v, 10); });
} else
val = [];
} else if (type === 'list' || type === 'lsub')
val = parseBoxList(m[5], this._literals);
else if (type === 'status')

Loading…
Cancel
Save