Fix walker not able to handle destr pattern in spread when compressing (#1438)
This commit is contained in:
committed by
Alex Lam S.L
parent
603d92effc
commit
2377171200
@@ -1922,6 +1922,8 @@ merge(Compressor.prototype, {
|
||||
else if (node.names[i] instanceof AST_Expansion) {
|
||||
if (node.names[i].expression instanceof AST_Symbol) {
|
||||
initializations.add(node.names[i].expression.name, destructuring_value);
|
||||
} else if (node.names[i].expression instanceof AST_Destructuring) {
|
||||
node.names[i].expression.walk(tw);
|
||||
} else {
|
||||
throw new Error(string_template("Can't handle expansion of type: {type}", {
|
||||
type: Object.getPrototypeOf(node.names[i].expression).TYPE
|
||||
|
||||
Reference in New Issue
Block a user