From a2fc076acb335ed94bdaacd343f9d5aeafe60f1f Mon Sep 17 00:00:00 2001 From: Nicolas Dorseuil Date: Mon, 16 Jun 2025 10:54:01 +0200 Subject: [PATCH] fix getContentRef --- packages/gitbook/src/components/PageBody/PageBody.tsx | 2 +- packages/gitbook/src/components/SitePage/SitePage.tsx | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/gitbook/src/components/PageBody/PageBody.tsx b/packages/gitbook/src/components/PageBody/PageBody.tsx index bc436506f..196ba3406 100644 --- a/packages/gitbook/src/components/PageBody/PageBody.tsx +++ b/packages/gitbook/src/components/PageBody/PageBody.tsx @@ -46,7 +46,7 @@ export function PageBody(props: { if (!ref) { return null; } - if (!options) { + if (options) { return resolveContentRef(ref, context, options); } return props.prefetchedRef.then((prefetched) => prefetched.get(ref) ?? null); diff --git a/packages/gitbook/src/components/SitePage/SitePage.tsx b/packages/gitbook/src/components/SitePage/SitePage.tsx index 9b4f2c4a4..66334fbaf 100644 --- a/packages/gitbook/src/components/SitePage/SitePage.tsx +++ b/packages/gitbook/src/components/SitePage/SitePage.tsx @@ -42,7 +42,7 @@ export async function SitePage(props: SitePageProps) { notFound(); } } else if (getPagePath(context.pages, pageTarget.page) !== rawPathname) { - console.log('Redirecting to page path', rawPathname, 'for page', pageTarget.page.id); + //TODO: Don't forget to uncomment the redirect when i'm done // redirect( // context.linker.toPathForPage({ // pages: context.pages,