diff options
author | Mihai Bazon <mihai.bazon@gmail.com> | 2015-07-22 16:53:25 +0300 |
---|---|---|
committer | Mihai Bazon <mihai.bazon@gmail.com> | 2015-07-22 16:55:55 +0300 |
commit | 905b6011784ca60d41919ac1a499962b7c1d4b02 (patch) | |
tree | da15abdd808cefbb9ef794385dd0c5c397f51683 /lib | |
parent | 63fb2d5a44db3d583b1927c8daa244bf9f4d8dd2 (diff) | |
download | tracifyjs-905b6011784ca60d41919ac1a499962b7c1d4b02.tar.gz tracifyjs-905b6011784ca60d41919ac1a499962b7c1d4b02.zip |
Don't attempt to negate non-boolean AST_Binary
Fix #751
Diffstat (limited to 'lib')
-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 54873f0d..4c4cf977 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2183,7 +2183,7 @@ merge(Compressor.prototype, { } break; } - if (compressor.option("comparisons")) { + if (compressor.option("comparisons") && self.is_boolean()) { if (!(compressor.parent() instanceof AST_Binary) || compressor.parent() instanceof AST_Assign) { var negated = make_node(AST_UnaryPrefix, self, { |