diff --git a/src/components/sidebar/index.tsx b/src/components/sidebar/index.tsx index 9d839f4c71124..ad7bc621a48cf 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 + '/',