Dont create page if exists is false

This commit is contained in:
itsfinniii
2026-03-28 15:58:23 +01:00
parent a6e3a48313
commit 5cbc906d65

View File

@@ -25,7 +25,7 @@ export async function getStaticPaths() {
const settings = await getSettings();
const page = await getPage(settings, Astro.url.pathname);
if (page === null || page.page === null) {
if (page === null || page.page === null || !page.page.exists) {
return new Response("Page not found.", {
status: 404,
statusText: "Not Found"