diff options
author | Mihai Bazon <mihai@bazon.net> | 2013-11-20 21:13:16 +0200 |
---|---|---|
committer | Mihai Bazon <mihai@bazon.net> | 2013-11-20 21:13:16 +0200 |
commit | 50b8d7272c3b0c7a222e5d6e433c9736f920434c (patch) | |
tree | aecf124650cbbd71a4d9105c51de691fa0544f5e /lib | |
parent | 7d11b96f48f7f03727fa664d540484f214cadca2 (diff) | |
download | tracifyjs-50b8d7272c3b0c7a222e5d6e433c9736f920434c.tar.gz tracifyjs-50b8d7272c3b0c7a222e5d6e433c9736f920434c.zip |
Fix faulty compression
`String(x + 5)` is not always the same as `x + "5"`. Overlooked that. :-(
Close #350
Diffstat (limited to 'lib')
-rw-r--r-- | lib/compress.js | 10 |
1 files changed, 0 insertions, 10 deletions
diff --git a/lib/compress.js b/lib/compress.js index c60ee19e..3cc59e2c 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2031,16 +2031,6 @@ merge(Compressor.prototype, { && self.right.getValue() === "" && self.left instanceof AST_Binary && self.left.operator == "+" && self.left.is_string(compressor)) { return self.left; - } else if (self.operator == "+" && self.right instanceof AST_String - && self.right.getValue() === "" && self.left instanceof AST_Binary - && self.left.operator == "+" && self.left.right instanceof AST_Number) { - return make_node(AST_Binary, self, { - left: self.left.left, - operator: "+", - right: make_node(AST_String, self.right, { - value: String(self.left.right.value) - }) - }); } if (compressor.option("evaluate")) { if (self.operator == "+") { |