diff options
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 3 |
1 files changed, 2 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index 18cbd05e..2491757f 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2365,8 +2365,9 @@ merge(Compressor.prototype, { if (expr.operator != "=") break; var lhs = expr.left; if (!(lhs instanceof AST_SymbolRef)) break; + if (is_undeclared_ref(lhs)) break; var def = lhs.definition(); - if (def.scope !== scope) break; + if (def.scope !== definitions[0].name.scope) break; var name = make_node(AST_SymbolVar, lhs, lhs); definitions.push(make_node(AST_VarDef, expr, { name: name, |