fix corner case in conditionals (#4777)

This commit is contained in:
Alex Lam S.L
2021-03-15 04:44:41 +00:00
committed by GitHub
parent 4fb54b066f
commit 2619bff3cf
2 changed files with 24 additions and 1 deletions

View File

@@ -11044,6 +11044,7 @@ merge(Compressor.prototype, {
if (len != b.length) return -2;
for (var i = 0; i < len; i++) {
if (!a[i].equivalent_to(b[i])) {
if (a[i] instanceof AST_Spread !== b[i] instanceof AST_Spread) return -3;
for (var j = i + 1; j < len; j++) {
if (!a[j].equivalent_to(b[j])) return -2;
}