fix corner case in ie8 (#4963)

fixes #4962
This commit is contained in:
Alex Lam S.L
2021-05-25 17:12:31 +01:00
committed by GitHub
parent 1e787c556b
commit eff45eac0e
2 changed files with 54 additions and 2 deletions

View File

@@ -5281,7 +5281,7 @@ merge(Compressor.prototype, {
if (member(def.scope, scopes)) return true;
if (scope && !def.redefined()) {
var scope_def = scope.find_variable(node.name);
if (def.undeclared ? !scope_def : scope_def === def) {
if (scope_def ? scope_def === def : def.undeclared) {
result = "f";
return true;
}
@@ -7637,7 +7637,6 @@ merge(Compressor.prototype, {
}).init_vars(node),
}));
exprs = [ node ];
}
if (values) exprs.push(make_node(AST_Call, this, {
expression: make_node(AST_Arrow, this, {