fix return
return may need to be an empty array, else if you: parse(""), it will raise TypeError
This commit is contained in:
parent
45435ce1bb
commit
54084ef856
1 changed files with 1 additions and 1 deletions
|
@ -41,7 +41,7 @@ function parse(expr) {
|
|||
|
||||
let result = expr.match(reg);
|
||||
|
||||
if (!result) return;
|
||||
if (!result) return [];
|
||||
result.shift();
|
||||
|
||||
return result;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue