File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 2525 "@ilha/router" : [" ../../packages/router/src/index.ts" ],
2626 "@ilha/router/vite" : [" ../../packages/router/src/vite.ts" ]
2727 }
28- }
28+ },
29+ "exclude" : [" ../../packages" ]
2930}
Original file line number Diff line number Diff line change @@ -335,7 +335,7 @@ export function prefetch(pathWithSearch: string): void {
335335 if ( ! isBrowser ) return ;
336336 if ( prefetchCache . has ( pathWithSearch ) ) return ;
337337 // Don't prefetch routes that have no loader — nothing to fetch.
338- const pathOnly = pathWithSearch . split ( "?" ) [ 0 ] ;
338+ const pathOnly = pathWithSearch . split ( "?" ) [ 0 ] ?? "" ;
339339 const match = findRoute ( _rou3 , "GET" , pathOnly ) ;
340340 if ( ! match ?. data ?. loader ) return ;
341341 const promise = fetchLoaderData ( pathWithSearch ) . catch ( ( e ) => {
@@ -369,7 +369,7 @@ async function mountRouteWithHydration(
369369 // Fetch loader data *only if* the matched route has a loader registered.
370370 // Routes registered client-side have `loader: undefined` when the Vite
371371 // plugin emits server-only loader imports behind `import.meta.env.SSR`.
372- const clientMatch = findRoute ( _rou3 , "GET" , pathWithSearch . split ( "?" ) [ 0 ] ) ;
372+ const clientMatch = findRoute ( _rou3 , "GET" , pathWithSearch . split ( "?" ) [ 0 ] ?? "" ) ;
373373 const hasLoader = ! ! clientMatch ?. data ?. loader ;
374374
375375 let props : Record < string , unknown > = { } ;
You can’t perform that action at this time.
0 commit comments