File tree Expand file tree Collapse file tree 3 files changed +7
-5
lines changed
packages/start-client-core/src Expand file tree Collapse file tree 3 files changed +7
-5
lines changed Original file line number Diff line number Diff line change @@ -173,7 +173,7 @@ export async function executeMiddleware(
173173 env : 'client' | 'server' ,
174174 opts : ServerFnMiddlewareOptions ,
175175) : Promise < ServerFnMiddlewareResult > {
176- const globalMiddlewares = getStartOptions ( ) . functionMiddleware || [ ]
176+ const globalMiddlewares = getStartOptions ( ) ? .functionMiddleware || [ ]
177177 const flattenedMiddlewares = flattenMiddlewares ( [
178178 ...globalMiddlewares ,
179179 ...middlewares ,
Original file line number Diff line number Diff line change @@ -7,7 +7,7 @@ import type { AnySerializationAdapter } from '@tanstack/router-core'
77
88export function getDefaultSerovalPlugins ( ) {
99 const start = getStartOptions ( )
10- const adapters = start . serializationAdapters as
10+ const adapters = start ? .serializationAdapters as
1111 | Array < AnySerializationAdapter >
1212 | undefined
1313 return [
Original file line number Diff line number Diff line change 11import { getStartContext } from '@tanstack/start-storage-context'
22import { createIsomorphicFn } from './createIsomorphicFn'
3+ import type { AnyStartInstanceOptions } from './createStart'
34
4- export const getStartOptions = createIsomorphicFn ( )
5- . client ( ( ) => window . __TSS_START_OPTIONS__ ! )
6- . server ( ( ) => getStartContext ( ) . startOptions )
5+ export const getStartOptions : ( ) => AnyStartInstanceOptions | undefined =
6+ createIsomorphicFn ( )
7+ . client ( ( ) => window . __TSS_START_OPTIONS__ )
8+ . server ( ( ) => getStartContext ( ) . startOptions )
You can’t perform that action at this time.
0 commit comments