aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js10
1 files changed, 4 insertions, 6 deletions
diff --git a/lib/compress.js b/lib/compress.js
index 72f8e636..b371aadb 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -4080,12 +4080,10 @@ merge(Compressor.prototype, {
def(AST_ObjectProperty, function(compressor, first_in_statement) {
return this.value.drop_side_effect_free(compressor, first_in_statement);
});
- def(AST_Sequence, function(compressor) {
- var last = this.tail_node();
- var expr = last.drop_side_effect_free(compressor);
- if (expr === last) return this;
- var expressions = this.expressions.slice(0, -1);
- if (expr) expressions.push(expr);
+ def(AST_Sequence, function(compressor, first_in_statement) {
+ var expressions = trim(this.expressions, compressor, first_in_statement);
+ if (expressions === this.expressions) return this;
+ if (!expressions) return null;
return make_sequence(this, expressions);
});
def(AST_Sub, function(compressor, first_in_statement) {