File tree Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Expand file tree Collapse file tree 2 files changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -23,7 +23,7 @@ export const handle = (userApp?: Hono, options?: Options) => {
23
23
const args = createGetLoadContextArgs ( c )
24
24
25
25
const remixContext = getLoadContext ( args )
26
- return handler ( c . req . raw , remixContext )
26
+ return handler ( c . req . raw , remixContext instanceof Promise ? await remixContext : remixContext )
27
27
} )
28
28
29
29
return app
Original file line number Diff line number Diff line change @@ -8,10 +8,10 @@ export type GetLoadContext = (args: {
8
8
// eslint-disable-next-line @typescript-eslint/no-explicit-any
9
9
cloudflare : any
10
10
}
11
- } ) => AppLoadContext
11
+ } ) => AppLoadContext | Promise < AppLoadContext >
12
12
13
13
// eslint-disable-next-line @typescript-eslint/no-explicit-any
14
- export const defaultGetLoadContext = ( { context } : any ) => {
14
+ export const defaultGetLoadContext = ( { context } : any ) : AppLoadContext => {
15
15
return {
16
16
...context ,
17
17
}
You can’t perform that action at this time.
0 commit comments