fix corner case in inline (#5386)

fixes #5385
This commit is contained in:
Alex Lam S.L
2022-03-20 22:50:28 +08:00
committed by GitHub
parent 46570a4eb6
commit 5e30f3a48b
2 changed files with 75 additions and 0 deletions

View File

@@ -13260,6 +13260,7 @@ Compressor.prototype.compress = function(node) {
if (fn.body[0] instanceof AST_Directive) return;
if (fn.contains_this()) return;
if (!scope) scope = find_scope(compressor);
if (in_async_generator(scope)) return;
var defined = new Dictionary();
defined.set("NaN", true);
while (!(scope instanceof AST_Scope)) {