Skip to content

Commit 7845e32

Browse files
authored
fix(volar): make typed plugin work with vue-tsc (#2607)
Fix posva/unplugin-vue-router#778
1 parent 20c018b commit 7845e32

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/router/src/volar/entries/sfc-typed-router.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -62,7 +62,7 @@ const plugin: VueLanguagePlugin<{ options: { rootDir?: string } }> = ({
6262
if (
6363
ts.isCallExpression(node) &&
6464
ts.isIdentifier(node.expression) &&
65-
node.expression.text === 'useRoute' &&
65+
ts.idText(node.expression) === 'useRoute' &&
6666
!node.typeArguments &&
6767
!node.arguments.length
6868
) {

0 commit comments

Comments
 (0)