aboutsummaryrefslogtreecommitdiff
path: root/lib
diff options
context:
space:
mode:
authorMihai Bazon <mihai@bazon.net>2012-11-13 14:34:38 +0200
committerMihai Bazon <mihai@bazon.net>2012-11-13 14:38:55 +0200
commit60c0f40250f0f68ac78f8ddab177336040243579 (patch)
tree88b6c65e859bf28d5c219a5045a8304824fb41b3 /lib
parente02771a5f2e23f7d75242a70729dbc8216bb4bfb (diff)
parentf96f796f71a1eb4657f42c23513c59eaf11bf401 (diff)
downloadtracifyjs-60c0f40250f0f68ac78f8ddab177336040243579.tar.gz
tracifyjs-60c0f40250f0f68ac78f8ddab177336040243579.zip
Merge branch 'optimize_concat' of https://github.com/rvanvelzen/UglifyJS2 into rvanvelzen-optimize_concat
Diffstat (limited to 'lib')
-rw-r--r--lib/compress.js5
1 files changed, 5 insertions, 0 deletions
diff --git a/lib/compress.js b/lib/compress.js
index dcd376ca..ed664a28 100644
--- a/lib/compress.js
+++ b/lib/compress.js
@@ -1656,6 +1656,11 @@ merge(Compressor.prototype, {
case "<=": reverse(">="); break;
}
}
+ if (self.operator == "+" && self.right instanceof AST_String
+ && self.right.getValue() === "" && self.left instanceof AST_Binary
+ && self.left.operator == "+" && self.left.is_string()) {
+ return self.left;
+ }
return self;
});