diff options
Diffstat (limited to 'lib/compress.js')
-rw-r--r-- | lib/compress.js | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js index 00d03fd4..6aee9497 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -893,10 +893,11 @@ merge(Compressor.prototype, { || node instanceof AST_Call && lhs instanceof AST_PropAccess && lhs.equivalent_to(node.expression) || node instanceof AST_Debugger || node instanceof AST_IterationStatement && !(node instanceof AST_For) - || node instanceof AST_SymbolRef && !node.is_declared(compressor) || node instanceof AST_Try || node instanceof AST_With - || parent instanceof AST_For && node !== parent.init) { + || parent instanceof AST_For && node !== parent.init + || (side_effects || !replace_all) + && (node instanceof AST_SymbolRef && !node.is_declared(compressor))) { abort = true; return node; } |