fix corner cases in braces & sequences (#4221)

fixes #4220
This commit is contained in:
Alex Lam S.L
2020-10-14 16:39:35 +01:00
committed by GitHub
parent 7f35d9cee0
commit 3d71e97dd1
3 changed files with 51 additions and 3 deletions

View File

@@ -2513,7 +2513,7 @@ merge(Compressor.prototype, {
var line = block.body[i];
if (line instanceof AST_Var && declarations_only(line)) {
decls.push(line);
} else if (stat) {
} else if (stat || line instanceof AST_Const) {
return false;
} else {
stat = line;