fix corner case in inline (#5284)

fixes #5283
This commit is contained in:
Alex Lam S.L
2022-01-10 07:43:26 +00:00
committed by GitHub
parent caaa753861
commit c7d2837184
2 changed files with 38 additions and 0 deletions

View File

@@ -12998,6 +12998,7 @@ Compressor.prototype.compress = function(node) {
});
scope = scope.parent_scope;
}
if (!member(scope, compressor.stack)) return;
if (scope instanceof AST_Toplevel && fn.variables.size() > (arrow ? 0 : 1)) {
if (!compressor.toplevel.vars) return;
if (fn.functions.size() > 0 && !compressor.toplevel.funcs) return;