aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 7131e104..9c1fc3a9 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1549,10 +1549,9 @@ merge(Compressor.prototype, {
return lvalues.has(node.name.name) || side_effects && may_modify(node.name);
}
var sym = is_lhs(node.left, node);
- if (!sym) return false;
- return lvalues.has(sym.name)
- || sym instanceof AST_PropAccess
- || read_toplevel && compressor.exposed(sym.definition());
+ if (sym instanceof AST_PropAccess) return true;
+ if (!(sym instanceof AST_SymbolRef)) return false;
+ return lvalues.has(sym.name) || read_toplevel && compressor.exposed(sym.definition());
}
function extract_args() {