Fix bug with MI Parsing if there is a list with empty strings

A JavaScript string is a falsy value - but an empty string is valid in these positions - so need to explicitly check for undefined instead of just falsy.
This commit is contained in:
Marcel Ball 2018-01-24 16:00:04 -04:00
commit cdee9d6420
2 changed files with 6 additions and 1 deletions

View file

@ -213,7 +213,7 @@ export function parseMI(output: string): MINode {
let values = [];
values.push(value);
let remaining = output;
while (value = parseCommaValue())
while ((value = parseCommaValue()) !== undefined)
values.push(value);
output = output.substr(1); // ]
return values;