Skip to content

Commit

Permalink
account for trailingSlash
Browse files Browse the repository at this point in the history
  • Loading branch information
lilnasy committed Dec 15, 2023
1 parent c01580a commit 7c81b21
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion packages/astro/src/core/app/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -333,7 +333,8 @@ export class App {
request: Request,
{ status, response: originalResponse, skipMiddleware = false }: RenderErrorOptions
): Promise<Response> {
const errorRouteData = matchRoute('/' + status, this.#manifestData);
const errorRoutePath = `/${status}${this.#manifest.trailingSlash === "always" ? '/' : ''}`;
const errorRouteData = matchRoute(errorRoutePath, this.#manifestData);
const url = new URL(request.url);
if (errorRouteData) {
if (errorRouteData.prerender) {
Expand Down

0 comments on commit 7c81b21

Please sign in to comment.