From 85a5fc0aeb1785982506c09a484e12608ba01624 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Tue, 30 Jun 2015 10:07:13 +0300 Subject: [PATCH] Don't drop parens in a * (b * c). Close #744 --- lib/compress.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) 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, -- 2.34.1