remove extraneous ! before AST_Arrow (#2185)
This commit is contained in:
@@ -561,8 +561,8 @@ merge(Compressor.prototype, {
|
||||
return orig.length == 1 && orig[0] instanceof AST_SymbolLambda;
|
||||
});
|
||||
|
||||
function is_func_expr(node, traditional) {
|
||||
return node instanceof AST_Function || !traditional && node instanceof AST_Arrow;
|
||||
function is_func_expr(node) {
|
||||
return node instanceof AST_Arrow || node instanceof AST_Function;
|
||||
}
|
||||
|
||||
function is_lhs_read_only(lhs) {
|
||||
@@ -706,9 +706,9 @@ merge(Compressor.prototype, {
|
||||
return x;
|
||||
};
|
||||
|
||||
function is_iife_call(node, traditional) {
|
||||
function is_iife_call(node) {
|
||||
if (node instanceof AST_Call && !(node instanceof AST_New)) {
|
||||
return is_func_expr(node.expression, traditional) || is_iife_call(node.expression);
|
||||
return node.expression instanceof AST_Function || is_iife_call(node.expression);
|
||||
}
|
||||
return false;
|
||||
}
|
||||
@@ -3452,7 +3452,7 @@ merge(Compressor.prototype, {
|
||||
}
|
||||
if (compressor.option("negate_iife")
|
||||
&& compressor.parent() instanceof AST_SimpleStatement
|
||||
&& is_iife_call(self, true)) {
|
||||
&& is_iife_call(self)) {
|
||||
return self.negate(compressor, true);
|
||||
}
|
||||
var ev = self.evaluate(compressor);
|
||||
|
||||
Reference in New Issue
Block a user