From d4c25c571bfac8e9bf91b2b894837d61370b0c35 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Thu, 1 Nov 2012 13:35:08 +0200 Subject: [PATCH] fix compressing UnaryPrefix only try negating the expression if the operator is `!` #kendo --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index ee255d78..c3b76118 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1446,7 +1446,7 @@ merge(Compressor.prototype, { 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)); } return self.evaluate(compressor)[0]; -- 2.34.1