From 31250868aeec8a3796f73c5cd0e1e2f5a58a18c0 Mon Sep 17 00:00:00 2001 From: James Birtles Date: Tue, 21 Aug 2018 21:17:51 +0100 Subject: [PATCH] better shorthand detection --- src/parse/read/context.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/parse/read/context.ts b/src/parse/read/context.ts index 51bce0a754..e7a1523f2a 100644 --- a/src/parse/read/context.ts +++ b/src/parse/read/context.ts @@ -87,7 +87,7 @@ export default function readContext(parser: Parser) { end: value.end, type: 'Property', kind: 'init', - shorthand: key === value, + shorthand: value.type === 'Identifier' && value.name === name, key, value };