fix corner case in collapse_vars (#5720)

fixes #5719
This commit is contained in:
Alex Lam S.L
2022-10-24 15:16:06 +01:00
committed by GitHub
parent fb1bff2c0a
commit 30bf068768
2 changed files with 28 additions and 1 deletions

View File

@@ -2498,7 +2498,7 @@ Compressor.prototype.compress = function(node) {
hit_index++;
}
branch.expression = branch.expression.transform(tt);
if (!replace_all) break;
if (!replace_all || verify_ref) break;
scan_rhs = false;
}
}