Allow empty destructuring (#1773)
This commit is contained in:
committed by
Alex Lam S.L
parent
35bae3fcd0
commit
17f0cc359f
@@ -448,8 +448,6 @@ var AST_ArrowParametersOrSeq = DEFNODE("ArrowParametersOrSeq", "expressions", {
|
||||
} else if (ex instanceof AST_Hole) {
|
||||
return ex;
|
||||
} else if (ex instanceof AST_Destructuring) {
|
||||
if (ex.names.length == 0)
|
||||
croak("Invalid destructuring function parameter", ex.start.line, ex.start.col);
|
||||
ex.names = ex.names.map(to_fun_args);
|
||||
return insert_default(ex, default_seen_above);
|
||||
} else if (ex instanceof AST_SymbolRef) {
|
||||
|
||||
Reference in New Issue
Block a user