From 89127acab00a333c800930b74b5a2e40c3405000 Mon Sep 17 00:00:00 2001 From: arlo Date: Wed, 27 Nov 2024 20:57:21 +0800 Subject: [PATCH] fix(kit): add null-safety check for resolving matched route, close #708 --- packages/core/src/rpc/global.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/src/rpc/global.ts b/packages/core/src/rpc/global.ts index 275fee2c8..5b39a36de 100644 --- a/packages/core/src/rpc/global.ts +++ b/packages/core/src/rpc/global.ts @@ -140,7 +140,7 @@ export const functions = { getMatchedRoutes(path: string) { const c = console.warn console.warn = () => {} - const matched = devtoolsRouter.value?.resolve({ + const matched = devtoolsRouter.value?.resolve?.({ path: path || '/', }).matched ?? [] console.warn = c