diff --git a/packages/gitbook/src/components/TableOfContents/encodeClientTableOfContents.ts b/packages/gitbook/src/components/TableOfContents/encodeClientTableOfContents.ts index d087e80dc6..bf8ccb2987 100644 --- a/packages/gitbook/src/components/TableOfContents/encodeClientTableOfContents.ts +++ b/packages/gitbook/src/components/TableOfContents/encodeClientTableOfContents.ts @@ -72,7 +72,7 @@ export async function encodeClientTableOfContents( result.push( removeUndefined({ id: page.id, - title: page.linkTitle ?? page.title, + title: page.linkTitle || page.title, href, emoji: page.emoji, icon: page.icon, diff --git a/packages/gitbook/src/lib/references.tsx b/packages/gitbook/src/lib/references.tsx index c9b6aefa53..f5245b6897 100644 --- a/packages/gitbook/src/lib/references.tsx +++ b/packages/gitbook/src/lib/references.tsx @@ -129,7 +129,7 @@ export async function resolveContentRef( const page = resolvePageResult?.page; const ancestors = resolvePageResult?.ancestors.map((ancestor) => ({ - label: ancestor.linkTitle ?? ancestor.title, + label: ancestor.linkTitle || ancestor.title, icon: ancestor.emoji || ancestor.icon ? ( ; }