fix compressing UnaryPrefix
only try negating the expression if the operator is `!` #kendo
This commit is contained in:
@@ -1446,7 +1446,7 @@ merge(Compressor.prototype, {
|
|||||||
return make_node(AST_True, self);
|
return make_node(AST_True, self);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (e instanceof AST_Binary) {
|
if (e instanceof AST_Binary && self.operator == "!") {
|
||||||
self = best_of(self, e.negate(compressor));
|
self = best_of(self, e.negate(compressor));
|
||||||
}
|
}
|
||||||
return self.evaluate(compressor)[0];
|
return self.evaluate(compressor)[0];
|
||||||
|
|||||||
Reference in New Issue
Block a user