Skip to content

Commit

Permalink
Add fallback if site isn't defined
Browse files Browse the repository at this point in the history
  • Loading branch information
zephraph committed Oct 4, 2024
1 parent fe8fb3d commit 5b0aa9f
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion src/pages/rss.xml.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,9 @@ export const GET: APIRoute = async (context) => {
page.customMetadata?.updated
? new Date(page.customMetadata?.updated)
: new Date(page.customMetadata?.published!),
link: `${context.locals.runtime.env.SITE}/${page.customMetadata?.slug}`,
link: `${context.locals.runtime.env.SITE ?? "https://just-be.dev"}/${
page.customMetadata?.slug
}`,
}));

return rss({
Expand Down

0 comments on commit 5b0aa9f

Please sign in to comment.