fix(compiler-core): fix property shorthand detection

fix #845
This commit is contained in:
Evan You
2020-03-16 10:27:03 -04:00
parent c7ae269972
commit 586e5bb800
2 changed files with 12 additions and 1 deletions

View File

@@ -271,7 +271,8 @@ const isPropertyShorthand = (node: Node, parent: Node) => {
isStaticProperty(parent) &&
parent.value === node &&
parent.key.type === 'Identifier' &&
parent.key.name === (node as Identifier).name
parent.key.name === (node as Identifier).name &&
parent.key.start === node.start
)
}