aboutsummaryrefslogtreecommitdiff
path: root/lib/compress.js
diff options
context:
space:
mode:
Diffstat (limited to 'lib/compress.js')
-rw-r--r--lib/compress.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/lib/compress.js b/lib/compress.js
index ddbf41fa..a7472ce7 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -993,7 +993,7 @@ function Compressor(options, false_by_default) {
}
}
if (is_empty(self.alternative)) self.alternative = null;
- var negated = self.condition.negate(compressor);
+ var negated = self.condition.negate(compressor).optimize(compressor);
var negated_is_best = best_of(self.condition, negated) === negated;
if (self.alternative && negated_is_best) {
negated_is_best = false; // because we already do the switch here.
@@ -1077,7 +1077,7 @@ function Compressor(options, false_by_default) {
if (aborts(self.alternative)) {
var body = self.body;
self.body = self.alternative;
- self.condition = negated_is_best ? negated : self.condition.negate(compressor);
+ self.condition = negated_is_best ? negated : self.condition.negate(compressor).optimize(compressor);
self.alternative = null;
return make_node(AST_BlockStatement, self, {
body: [ self, body ]