fix corner case in collapse_vars (#4797)

This commit is contained in:
Alex Lam S.L
2021-03-17 23:50:55 +00:00
committed by GitHub
parent d837a46ebd
commit 7da49b5709
2 changed files with 25 additions and 0 deletions

View File

@@ -2428,6 +2428,7 @@ merge(Compressor.prototype, {
if (parent.condition !== node) return node;
return find_stop_value(parent, level + 1);
}
if (parent instanceof AST_Yield) return find_stop_value(parent, level + 1);
return null;
}