public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
cfd5c61
)
Fix RHS concat (raised in #330)
author
Richard van Velzen
<rvanvelzen1@gmail.com>
Sat, 26 Oct 2013 16:44:52 +0000
(18:44 +0200)
committer
Richard van Velzen
<rvanvelzen1@gmail.com>
Sat, 26 Oct 2013 16:44:52 +0000
(18:44 +0200)
When attempting to concat the left-side of the rhs, make sure the rhs is
a string.
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
121e312
..
13ae7c7
100644
(file)
--- 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, {