Skip to content

Commit 022758a

Browse files
committed
fix(volar): empty options
Fix #2609
1 parent 0392906 commit 022758a

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,13 +14,13 @@ import type ts from 'typescript'
1414
- (low priority) Enhance typing of `to` route in `beforeEnter` route guards defined in `definePage`
1515
*/
1616

17-
const plugin: VueLanguagePlugin<{ options: { rootDir?: string } }> = ({
17+
const plugin: VueLanguagePlugin<{ options?: { rootDir?: string } }> = ({
1818
compilerOptions,
1919
modules: { typescript: ts },
2020
config: { options },
2121
}) => {
2222
// Prioritize plugin options over tsconfig
23-
const rootDir = options.rootDir ?? compilerOptions.rootDir
23+
const rootDir = options?.rootDir ?? compilerOptions.rootDir
2424

2525
// Warn if no rootDir specified
2626
if (!rootDir) {

0 commit comments

Comments
 (0)