From 5b7b314b25a315a40b739f4acdf997e652c2dff1 Mon Sep 17 00:00:00 2001 From: Thuc Pham <51660321+thucpn@users.noreply.github.com> Date: Thu, 13 Mar 2025 18:31:55 +0700 Subject: [PATCH] fix: unhandled server error when accessing not found pages (#1753) --- apps/next/src/app/docs/[[...slug]]/page.tsx | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/apps/next/src/app/docs/[[...slug]]/page.tsx b/apps/next/src/app/docs/[[...slug]]/page.tsx index edd0edd59..4bcd66b60 100644 --- a/apps/next/src/app/docs/[[...slug]]/page.tsx +++ b/apps/next/src/app/docs/[[...slug]]/page.tsx @@ -11,8 +11,6 @@ import { } from "fumadocs-ui/page"; import { notFound } from "next/navigation"; -const { AutoTypeTable } = createTypeTable(); - export const revalidate = false; export default async function Page(props: { @@ -22,6 +20,7 @@ export default async function Page(props: { const page = source.getPage(params.slug); if (!page) notFound(); + const { AutoTypeTable } = createTypeTable(); const MDX = page.data.body; return ( -- GitLab