Fixed dot property issue with invlid identifier names.
Signed-off-by: Justin Lau <justin@tclau.com>
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user