Skip to content

Commit

Permalink
fix: prepare for astro 5.0 (#120)
Browse files Browse the repository at this point in the history
remove warning:

[deprecated] The adapter @astro-aws/adapter is using a deprecated signature of the 'app.render()' method. From Astro 4.0, locals and routeData are provided as properties on an optional object to this method. Using the old signature will cause an error in Astro 5.0. See withastro/astro#9199 for more information.
  • Loading branch information
mseele authored Jan 21, 2024
1 parent ba8b9ce commit bf856f3
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion packages/adapter/src/lambda/handlers/edge.ts
Original file line number Diff line number Diff line change
Expand Up @@ -94,7 +94,7 @@ const createExports = (
return def
}

const response = await app.render(request, routeData, args.locals)
const response = await app.render(request, { routeData, locals: args.locals })
const fnResponse = await createLambdaEdgeFunctionResponse(
app,
response,
Expand Down
2 changes: 1 addition & 1 deletion packages/adapter/src/lambda/handlers/ssr.ts
Original file line number Diff line number Diff line change
Expand Up @@ -157,7 +157,7 @@ const createExports = (
}
}

const response = await app.render(request, routeData, args.locals)
const response = await app.render(request, { routeData, locals: args.locals })

return createLambdaFunctionResponse(
app,
Expand Down

0 comments on commit bf856f3

Please sign in to comment.