aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2013-03-04 10:06:01 +0200
committerMihai Bazon <mihai@bazon.net>2013-03-04 10:06:01 +0200
commitaebafad41eab48f43ed649ce8c77e8f1528b50da (patch)
treeb18e15c002dea7074a9517d75dbcbd2d12664c95 /lib/compress.js
parent26746ce3167a768479435588dd9099bb7408018f (diff)
downloadtracifyjs-aebafad41eab48f43ed649ce8c77e8f1528b50da.tar.gz
tracifyjs-aebafad41eab48f43ed649ce8c77e8f1528b50da.zip
Fix reordering comparisons
Close #143
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js
index efdb49fe..ec571b3a 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1715,7 +1715,7 @@ merge(Compressor.prototype, {
OPT(AST_Binary, function(self, compressor){
function reverse(op) {
- if (!(self.left.has_side_effects() && self.right.has_side_effects())) {
+ if (!(self.left.has_side_effects() || self.right.has_side_effects())) {
if (op) self.operator = op;
var tmp = self.left;
self.left = self.right;