From e2daee9a655160e4eeea6dee4ceddfe0049ebacf Mon Sep 17 00:00:00 2001 From: Richard van Velzen Date: Sat, 26 Oct 2013 18:44:52 +0200 Subject: [PATCH] Fix RHS concat (raised in #330) When attempting to concat the left-side of the rhs, make sure the rhs is a string. --- lib/compress.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/compress.js b/lib/compress.js index 121e312a..13ae7c70 100644 --- a/lib/compress.js +++ b/lib/compress.js @@ -2067,7 +2067,8 @@ merge(Compressor.prototype, { && self.left.right instanceof AST_Constant && self.right instanceof AST_Binary && self.right.operator == "+" - && self.right.left instanceof AST_Constant) { + && self.right.left instanceof AST_Constant + && self.right.is_string(compressor)) { self = make_node(AST_Binary, self, { operator: "+", left: make_node(AST_Binary, self.left, { -- 2.34.1