public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
5bf617e
)
Don't drop parens in a * (b * c). Close #744
author
Mihai Bazon
<mihai.bazon@gmail.com>
Tue, 30 Jun 2015 07:07:13 +0000
(10:07 +0300)
committer
Mihai Bazon
<mihai.bazon@gmail.com>
Tue, 30 Jun 2015 07:10:29 +0000
(10:10 +0300)
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
530e7c2
..
091ad9e
100644
(file)
--- 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,