diff options
author | Mihai Bazon <mihai@bazon.net> | 2012-11-01 13:35:08 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2012-11-01 13:35:08 +0200 |
commit | d4c25c571bfac8e9bf91b2b894837d61370b0c35 (patch) | |
tree | daec211214cb9f9ffd3807757595ebaaec1a15cd | |
parent | 5248b79506d80c7da8b8a50225fe0bb48e607346 (diff) | |
download | tracifyjs-d4c25c571bfac8e9bf91b2b894837d61370b0c35.tar.gz tracifyjs-d4c25c571bfac8e9bf91b2b894837d61370b0c35.zip |
fix compressing UnaryPrefix
only try negating the expression if the operator is `!`
#kendo
-rw-r--r-- | lib/compress.js | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/lib/compress.js b/lib/compress.js index ee255d78..c3b76118 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -1446,7 +1446,7 @@ merge(Compressor.prototype, { return make_node(AST_True, self); } } - if (e instanceof AST_Binary) { + if (e instanceof AST_Binary && self.operator == "!") { self = best_of(self, e.negate(compressor)); } return self.evaluate(compressor)[0]; |