fix corner case in reduce_vars (#4095)

This commit is contained in:
Alex Lam S.L
2020-09-08 15:12:27 +01:00
committed by GitHub
parent 30761eede5
commit d97672613d
2 changed files with 110 additions and 3 deletions

View File

@@ -7779,7 +7779,7 @@ merge(Compressor.prototype, {
single_use = false;
} else if (recursive_ref(compressor, def)) {
single_use = false;
} else if (compressor.option("ie8") && fixed.name && def !== fixed.name.definition()) {
} else if (fixed.name && fixed.name.definition() !== def) {
single_use = false;
} else if (def.scope !== self.scope || def.orig[0] instanceof AST_SymbolFunarg) {
single_use = fixed.is_constant_expression(self.scope);