fix corner case in collapse_vars (#4634)

fixes #4633
This commit is contained in:
Alex Lam S.L
2021-02-10 00:45:36 +00:00
committed by GitHub
parent 228cdf8e7e
commit 5e6307974f
2 changed files with 31 additions and 1 deletions

View File

@@ -2009,7 +2009,7 @@ merge(Compressor.prototype, {
};
var tw = new TreeWalker(function(node) {
if (!arg) return true;
if (has_await(node)) {
if (has_await(node) || node instanceof AST_Yield) {
arg = null;
return true;
}