diff options
author | Alex Lam S.L <alexlamsl@gmail.com> | 2017-03-24 22:09:19 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-03-24 22:09:19 +0800 |
commit | 32283a0def807e0a382d4a6a23cc42e99084e1dd (patch) | |
tree | 9f5663a80419d4438b2474a2e5af48fc86d4b550 /lib | |
parent | ac51d4c5a079dccbc9a6cf69d06f757432c69694 (diff) | |
download | tracifyjs-32283a0def807e0a382d4a6a23cc42e99084e1dd.tar.gz tracifyjs-32283a0def807e0a382d4a6a23cc42e99084e1dd.zip |
fix cascade of `evaluate` optimisation (#1654)
Operator has changed, so break out from rest of the rules.
fixes #1649
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js index 3804a932..e13985ee 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -3292,6 +3292,7 @@ merge(Compressor.prototype, { left: self.left, right: self.right.expression }); + break; } // -a + b => b - a if (self.left instanceof AST_UnaryPrefix @@ -3303,6 +3304,7 @@ merge(Compressor.prototype, { left: self.right, right: self.left.expression }); + break; } case "*": associative = compressor.option("unsafe_math"); |