From 905b6011784ca60d41919ac1a499962b7c1d4b02 Mon Sep 17 00:00:00 2001 From: Mihai Bazon Date: Wed, 22 Jul 2015 16:53:25 +0300 Subject: Don't attempt to negate non-boolean AST_Binary Fix #751 --- lib/compress.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lib/compress.js') 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, { -- cgit v1.2.3