Skip to content

Commit

Permalink
feature: 支持在serverLoader中读取当前request,以实现在serverLoader中读取url中的参数和headers
Browse files Browse the repository at this point in the history
  • Loading branch information
奇风 committed Oct 19, 2023
1 parent 105306d commit 54119dc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/server/src/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -306,7 +306,7 @@ function createClientRoute(route: any) {
async function executeLoader(
routeKey: string,
routesWithServerLoader: RouteLoaders,
serverLoaderArgs: { request: Request }
serverLoaderArgs?: { request: Request }
) {
const mod = await routesWithServerLoader[routeKey]();
if (!mod.serverLoader || typeof mod.serverLoader !== 'function') {
Expand Down

0 comments on commit 54119dc

Please sign in to comment.