From: Richard van Velzen Date: Sat, 26 Oct 2013 16:44:52 +0000 (+0200) Subject: Fix RHS concat (raised in #330) X-Git-Url: https://git.ndcode.org/public/gitweb.cgi?a=commitdiff_plain;h=e2daee9a655160e4eeea6dee4ceddfe0049ebacf;p=UglifyJS.git Fix RHS concat (raised in #330) When attempting to concat the left-side of the rhs, make sure the rhs is a string. --- 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, {