From 0678ae2076a9f817ecb8837279c24cf54ea819c2 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 3 Oct 2012 11:34:05 +0300 Subject: fix for `a = !b && !c && !d && !e → a=!(b||c||d||e)` MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/compress.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'lib/compress.js') diff --git a/lib/compress.js b/lib/compress.js index 41578c14..16812571 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1416,7 +1416,8 @@ merge(Compressor.prototype, { return exp[0]; } if (compressor.option("comparisons")) { - if (!(compressor.parent() instanceof AST_Binary)) { + if (!(compressor.parent() instanceof AST_Binary) + || compressor.parent() instanceof AST_Assign) { var negated = make_node(AST_UnaryPrefix, self, { operator: "!", expression: self.negate(compressor) -- cgit v1.2.3