fix corner cases in sequences (#4690)

fixes #4689
This commit is contained in:
Alex Lam S.L
2021-02-25 04:48:40 +00:00
committed by GitHub
parent 822b1da5d2
commit 6d7ab63a66
3 changed files with 41 additions and 3 deletions

View File

@@ -3118,7 +3118,7 @@ merge(Compressor.prototype, {
}
}
} else if (stat instanceof AST_ForIn) {
stat.object = cons_seq(stat.object);
if (!is_lexical_definition(stat.init)) stat.object = cons_seq(stat.object);
} else if (stat instanceof AST_If) {
stat.condition = cons_seq(stat.condition);
} else if (stat instanceof AST_Switch) {