From 2cc39d611f99bd12be52c593246e5c326dc3b69c Mon Sep 17 00:00:00 2001 From: Robert Sese <734194+rsese@users.noreply.github.com> Date: Thu, 26 Jun 2025 19:40:31 -0500 Subject: [PATCH] fix tocitem serialization error (#56348) --- src/frame/middleware/context/generic-toc.ts | 2 +- src/landings/components/CategoryLanding.tsx | 2 +- src/landings/types.ts | 30 ++++++++++----------- 3 files changed, 17 insertions(+), 17 deletions(-) diff --git a/src/frame/middleware/context/generic-toc.ts b/src/frame/middleware/context/generic-toc.ts index ccabe2470c..f9e09ede8d 100644 --- a/src/frame/middleware/context/generic-toc.ts +++ b/src/frame/middleware/context/generic-toc.ts @@ -122,7 +122,7 @@ async function getTocItems(node: Tree, context: Context, opts: Options): Promise node.childPages.filter(filterHidden).map(async (child) => { const { page } = child const title = await page.renderProp('rawTitle', context, { textOnly: true }) - const octicon = page.octicon ? page.octicon : null + const octicon = page.octicon ?? null const category = page.category ? page.category : null const complexity = page.complexity ? page.complexity : null const industry = page.industry ? page.industry : null diff --git a/src/landings/components/CategoryLanding.tsx b/src/landings/components/CategoryLanding.tsx index 633185881d..ec28498715 100644 --- a/src/landings/components/CategoryLanding.tsx +++ b/src/landings/components/CategoryLanding.tsx @@ -141,7 +141,7 @@ export const CategoryLanding = () => { ({ fullPath: child.fullPath, title: child.title,