From 1429bc78bf168e76c190ec74a52573c7644b9e77 Mon Sep 17 00:00:00 2001 From: Abdellah Hariti Date: Tue, 18 Mar 2025 21:48:23 +0000 Subject: [PATCH] fix sidebar deeplinks closes #12882 --- src/components/sidebar/index.tsx | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/src/components/sidebar/index.tsx b/src/components/sidebar/index.tsx index 9d839f4c711249..ad7bc621a48cf4 100644 --- a/src/components/sidebar/index.tsx +++ b/src/components/sidebar/index.tsx @@ -60,9 +60,10 @@ export async function Sidebar({path, versions}: SidebarProps) { return { ...platform, - url: platformPageForCurrentPath - ? '/' + platformPageForCurrentPath.path + '/' - : platform.url, + url: + platformPageForCurrentPath && !platformPageForCurrentPath.missing + ? '/' + platformPageForCurrentPath.path + '/' + : platform.url, guides: platform.guides.map(guide => { const guidePageForCurrentPath = nodeForPath(rootNode, [ 'platforms', @@ -71,7 +72,7 @@ export async function Sidebar({path, versions}: SidebarProps) { guide.name, ...path.slice(currentGuide ? 4 : 2), ]); - return guidePageForCurrentPath + return guidePageForCurrentPath && !guidePageForCurrentPath.missing ? { ...guide, url: '/' + guidePageForCurrentPath.path + '/',