Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/dev.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ export const handle = (userApp?: Hono, options?: Options) => {
const args = createGetLoadContextArgs(c)

const remixContext = getLoadContext(args)
return handler(c.req.raw, remixContext)
return handler(c.req.raw, remixContext instanceof Promise ? await remixContext : remixContext)
})

return app
Expand Down
4 changes: 2 additions & 2 deletions src/remix.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,10 @@ export type GetLoadContext = (args: {
// eslint-disable-next-line @typescript-eslint/no-explicit-any
cloudflare: any
}
}) => AppLoadContext
}) => AppLoadContext | Promise<AppLoadContext>

// eslint-disable-next-line @typescript-eslint/no-explicit-any
export const defaultGetLoadContext = ({ context }: any) => {
export const defaultGetLoadContext = ({ context }: any): AppLoadContext => {
return {
...context,
}
Expand Down