fix corner case in merge_vars (#4550)

fixes #4548
This commit is contained in:
Alex Lam S.L
2021-01-12 19:48:46 +00:00
committed by GitHub
parent 90017051f2
commit c11a748908
2 changed files with 28 additions and 0 deletions

View File

@@ -4979,7 +4979,9 @@ merge(Compressor.prototype, {
var marker = new TreeWalker(function(node) {
if (node instanceof AST_Destructured) return;
if (node instanceof AST_DefaultValue) {
push();
node.value.walk(tw);
pop();
node.name.walk(marker);
} else if (node instanceof AST_DestructuredKeyVal) {
if (node.key instanceof AST_Node) {