aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 6354197d..e457d808 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1062,7 +1062,7 @@ merge(Compressor.prototype, {
var found = false;
return statements[stat_index].transform(new TreeTransformer(function(node, descend, in_list) {
if (found) return node;
- if (node === expr) {
+ if (node === expr || node.body === expr) {
found = true;
if (node instanceof AST_VarDef) {
drop_decl(node.name.definition());
@@ -1076,7 +1076,6 @@ merge(Compressor.prototype, {
case 0: return null;
case 1: return node.expressions[0];
}
- if (node instanceof AST_SimpleStatement && !node.body) return null;
}));
}