fix keyword shorthand property output for ecma >= 6 (#2493)

fixes #2491
This commit is contained in:
kzc
2017-11-19 00:53:42 -05:00
committed by Alex Lam S.L
parent e826973b76
commit f25bd13be6
3 changed files with 41 additions and 2 deletions

View File

@@ -1624,7 +1624,8 @@ function OutputStream(options) {
if (allowShortHand &&
self.value instanceof AST_Symbol &&
is_identifier_string(self.key) &&
get_name(self.value) === self.key
get_name(self.value) === self.key &&
is_identifier(self.key)
) {
print_property_name(self.key, self.quote, output);