Update arg-parser.js to always return extras, even if empty

This commit is contained in:
Zakary Timson 2022-02-10 18:57:58 +00:00
parent d80f33a513
commit c9f99fd36c

View File

@ -34,7 +34,7 @@ export class ArgParser {
} }
req.forEach((a, i) => parsed[a.key] = queue[i]); req.forEach((a, i) => parsed[a.key] = queue[i]);
queue.splice(0, req.length); queue.splice(0, req.length);
if(queue.length) parsed.extra = queue; parsed.extra = queue;
return parsed; return parsed;
} }