From: Mihai Bazon Date: Tue, 30 Jun 2015 07:07:13 +0000 (+0300) Subject: Don't drop parens in a * (b * c). Close #744 X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=85a5fc0aeb1785982506c09a484e12608ba01624;p=UglifyJS.git Don't drop parens in a * (b * c). Close #744 --- diff --git a/lib/compress.js b/lib/compress.js index 530e7c2f..091ad9e5 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2230,10 +2230,11 @@ merge(Compressor.prototype, { } } } - // x * (y * z) ==> x * y * z + // x && (y && z) ==> x && y && z + // x || (y || z) ==> x || y || z if (self.right instanceof AST_Binary && self.right.operator == self.operator - && (self.operator == "*" || self.operator == "&&" || self.operator == "||")) + && (self.operator == "&&" || self.operator == "||")) { self.left = make_node(AST_Binary, self.left, { operator : self.operator,