fix corner case in reduce_vars (#4211)

fixes #4210
This commit is contained in:
Alex Lam S.L
2020-10-13 08:52:03 +01:00
committed by GitHub
parent 3096f6fdad
commit 0e234a25c5
3 changed files with 41 additions and 5 deletions

View File

@@ -6651,7 +6651,7 @@ merge(Compressor.prototype, {
var s = def.scope;
do {
s = s.parent_scope;
if (s.variables.has(node.name)) return false;
if (s.var_names()[node.name]) return false;
} while (s !== scope);
return true;
}) ? make_node(AST_Var, self, {