From: Mihai Bazon Date: Wed, 3 Oct 2012 08:34:05 +0000 (+0300) Subject: fix for `a = !b && !c && !d && !e → a=!(b||c||d||e)` X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=0678ae2076a9f817ecb8837279c24cf54ea819c2;p=UglifyJS.git fix for `a = !b && !c && !d && !e → a=!(b||c||d||e)` --- 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)