fix corner case in inline & sequences (#4718)

fixes #4717
This commit is contained in:
Alex Lam S.L
2021-03-02 09:39:34 +00:00
committed by GitHub
parent 23b51287aa
commit b1e05fd48a
2 changed files with 35 additions and 1 deletions

View File

@@ -3126,7 +3126,7 @@ merge(Compressor.prototype, {
if (prev) {
if (stat instanceof AST_Exit) {
if (stat.value || !in_async_generator(scope)) {
stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat)).transform(compressor);
stat.value = cons_seq(stat.value || make_node(AST_Undefined, stat)).optimize(compressor);
}
} else if (stat instanceof AST_For) {
if (!(stat.init instanceof AST_Definitions)) {