diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-11-01 15:49:05 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-11-01 15:49:05 +0200 |
commit | cf409800be18c76efc91a65051bea5f4cb9c44e4 (patch) | |
tree | 7a65cad9a4ffe29ee1bf6cdcd68569f29031821f /lib | |
parent | 18270dd9f371f1b5debad2521c4b9f7fce02051f (diff) | |
download | tracifyjs-cf409800be18c76efc91a65051bea5f4cb9c44e4.tar.gz tracifyjs-cf409800be18c76efc91a65051bea5f4cb9c44e4.zip |
it's safe to negate expression in !EXP only in boolean context
#kendo
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/lib/compress.js b/lib/compress.js index 04fb7855..5ceef200 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1446,9 +1446,9 @@ merge(Compressor.prototype, { compressor.warn("Boolean expression always true [{file}:{line},{col}]", self.start); return make_node(AST_True, self); } - } - if (e instanceof AST_Binary && self.operator == "!") { - self = best_of(self, e.negate(compressor)); + if (e instanceof AST_Binary && self.operator == "!") { + self = best_of(self, e.negate(compressor)); + } } return self.evaluate(compressor)[0]; }); |