From fadadee8f9f23f03cdd36bc9430eb946829b5e92 Mon Sep 17 00:00:00 2001 From: sebastienlorber Date: Thu, 10 Nov 2022 18:06:34 +0100 Subject: [PATCH] restore wrongly deleted code --- .../src/theme/DocSidebarItem/Category/index.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx index f9230c1b8cae..a3bb2f05d355 100644 --- a/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx +++ b/packages/docusaurus-theme-classic/src/theme/DocSidebarItem/Category/index.tsx @@ -59,6 +59,9 @@ function useCategoryHrefWithSSRFallback( ): string | undefined { const isBrowser = useIsBrowser(); return useMemo(() => { + if (item.href && !item.linkUnlisted) { + return item.href; + } // In these cases, it's not necessary to render a fallback // We skip the "findFirstCategoryLink" computation if (isBrowser || !item.collapsible) {