public
/
UglifyJS.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
8227e87
)
Fixed dot property issue with invlid identifier names.
author
Justin Lau
<justin@tclau.com>
Sun, 5 May 2013 14:27:43 +0000
(22:27 +0800)
committer
Justin Lau
<justin@tclau.com>
Sun, 5 May 2013 14:27:43 +0000
(22:27 +0800)
Signed-off-by: Justin Lau <justin@tclau.com>
lib/compress.js
patch
|
blob
|
history
diff --git
a/lib/compress.js
b/lib/compress.js
index
ebd3dd7
..
623fe45
100644
(file)
--- a/
lib/compress.js
+++ b/
lib/compress.js
@@
-1962,7
+1962,8
@@
merge(Compressor.prototype, {
var prop = self.property;
if (prop instanceof AST_String && compressor.option("properties")) {
prop = prop.getValue();
- if (is_identifier(prop) || compressor.option("screw_ie8")) {
+ if (is_identifier(prop)
+ || (compressor.option("screw_ie8") && /^[a-z_$][a-z0-9_$]*$/i.test(prop))) {
return make_node(AST_Dot, self, {
expression : self.expression,
property : prop