fixes #259: don't unnecessarily quote object properties when --screw-ie8

This commit is contained in:
Michael Ficarra
2013-08-18 19:45:06 -05:00
parent 6ea3f7fe34
commit d9ad3c7cbf
3 changed files with 12 additions and 12 deletions

View File

@@ -2005,8 +2005,7 @@ merge(Compressor.prototype, {
var prop = self.property;
if (prop instanceof AST_String && compressor.option("properties")) {
prop = prop.getValue();
if ((compressor.option("screw_ie8") && RESERVED_WORDS(prop))
|| (!(RESERVED_WORDS(prop)) && is_identifier_string(prop))) {
if (RESERVED_WORDS(prop) ? compressor.option("screw_ie8") : is_identifier_string(prop)) {
return make_node(AST_Dot, self, {
expression : self.expression,
property : prop