From d22b55fc829226fbfded9c38e7d33160efce67ea Mon Sep 17 00:00:00 2001 From: iCrawl Date: Sun, 26 May 2024 18:43:34 +0200 Subject: [PATCH] fix: restore 404 page --- apps/website/src/util/fetchNode.ts | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/apps/website/src/util/fetchNode.ts b/apps/website/src/util/fetchNode.ts index d2d4da5c8..6ff84150f 100644 --- a/apps/website/src/util/fetchNode.ts +++ b/apps/website/src/util/fetchNode.ts @@ -31,5 +31,9 @@ export async function fetchNode({ { next: isMainVersion ? { revalidate: 0 } : { revalidate: 604_800 } }, ); + if (!fileContent.ok) { + return null; + } + return fileContent.json(); }