Do not apply negate_iife optimization to new expression
This commit is contained in:
@@ -811,6 +811,11 @@ merge(Compressor.prototype, {
|
||||
if (stat instanceof AST_SimpleStatement) {
|
||||
stat.body = (function transform(thing) {
|
||||
return thing.transform(new TreeTransformer(function(node){
|
||||
if (node instanceof AST_New
|
||||
&& node.expression instanceof AST_Call
|
||||
&& node.expression.expression instanceof AST_Function) {
|
||||
return node;
|
||||
}
|
||||
if (node instanceof AST_Call && node.expression instanceof AST_Function) {
|
||||
return make_node(AST_UnaryPrefix, node, {
|
||||
operator: "!",
|
||||
|
||||
Reference in New Issue
Block a user