diff options
Diffstat (limited to 'lib')
-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 f44277cd..c60ee19e 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -85,13 +85,14 @@ merge(Compressor.prototype, { }, before: function(node, descend, in_list) { if (node._squeezed) return node; + var was_scope = false; if (node instanceof AST_Scope) { - //node.drop_unused(this); node = node.hoist_declarations(this); + was_scope = true; } descend(node, this); node = node.optimize(this); - if (node instanceof AST_Scope) { + if (was_scope && node instanceof AST_Scope) { node.drop_unused(this); descend(node, this); } |