Skip to content

Commit

Permalink
fix: serverBuild access in sitemap (#845)
Browse files Browse the repository at this point in the history
  • Loading branch information
natac13 authored Sep 9, 2024
1 parent c2e8ed6 commit f95a03a
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/routes/_seo+/sitemap[.]xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,8 @@ import { type ServerBuild, type LoaderFunctionArgs } from '@remix-run/node'
import { getDomainUrl } from '#app/utils/misc.tsx'

export async function loader({ request, context }: LoaderFunctionArgs) {
const serverBuild = (await context.serverBuild) as ServerBuild
return generateSitemap(request, serverBuild.routes, {
const serverBuild = (await context.serverBuild) as { build: ServerBuild }
return generateSitemap(request, serverBuild.build.routes, {
siteUrl: getDomainUrl(request),
headers: {
'Cache-Control': `public, max-age=${60 * 5}`,
Expand Down

0 comments on commit f95a03a

Please sign in to comment.