fix corner case in reduce_vars (#4782)

This commit is contained in:
Alex Lam S.L
2021-03-16 00:05:01 +00:00
committed by GitHub
parent aa6e33e208
commit e821787095
2 changed files with 82 additions and 2 deletions

View File

@@ -10324,7 +10324,7 @@ merge(Compressor.prototype, {
single_use = false;
} else if (fixed.name && fixed.name.definition() !== def) {
single_use = false;
} else if (fixed.parent_scope !== self.scope.resolve() || is_funarg(def)) {
} else if (fixed.parent_scope !== self.scope || is_funarg(def)) {
single_use = fixed.is_constant_expression(self.scope);
if (single_use == "f") {
var scope = self.scope;