Do not lift sequence from right-hand side of binary operation. Fix #343
This commit is contained in:
@@ -1875,16 +1875,6 @@ merge(Compressor.prototype, {
|
|||||||
seq = AST_Seq.from_array(x).transform(compressor);
|
seq = AST_Seq.from_array(x).transform(compressor);
|
||||||
return seq;
|
return seq;
|
||||||
}
|
}
|
||||||
if (this.right instanceof AST_Seq
|
|
||||||
&& !(this.operator == "||" || this.operator == "&&")
|
|
||||||
&& !this.left.has_side_effects(compressor)) {
|
|
||||||
var seq = this.right;
|
|
||||||
var x = seq.to_array();
|
|
||||||
this.right = x.pop();
|
|
||||||
x.push(this);
|
|
||||||
seq = AST_Seq.from_array(x).transform(compressor);
|
|
||||||
return seq;
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
return this;
|
return this;
|
||||||
});
|
});
|
||||||
|
|||||||
Reference in New Issue
Block a user