fix(compiler-sfc): fix defineProps() call on imported identifier

This commit is contained in:
Evan You
2021-06-25 14:05:59 -04:00
parent be2b1d3c2f
commit 691d354af9
3 changed files with 39 additions and 1 deletions

View File

@@ -1492,7 +1492,15 @@ export function walkIdentifiers(
})
}
function isRefIdentifier(id: Identifier, parent: Node, parentStack: Node[]) {
function isRefIdentifier(
id: Identifier,
parent: Node | null,
parentStack: Node[]
) {
if (!parent) {
return true
}
// declaration id
if (
(parent.type === 'VariableDeclarator' ||