Skip to content

Commit 1429bc7

Browse files
committed
fix sidebar deeplinks
closes #12882
1 parent b329b65 commit 1429bc7

File tree

1 file changed

+5
-4
lines changed

1 file changed

+5
-4
lines changed

src/components/sidebar/index.tsx

+5-4
Original file line numberDiff line numberDiff line change
@@ -60,9 +60,10 @@ export async function Sidebar({path, versions}: SidebarProps) {
6060

6161
return {
6262
...platform,
63-
url: platformPageForCurrentPath
64-
? '/' + platformPageForCurrentPath.path + '/'
65-
: platform.url,
63+
url:
64+
platformPageForCurrentPath && !platformPageForCurrentPath.missing
65+
? '/' + platformPageForCurrentPath.path + '/'
66+
: platform.url,
6667
guides: platform.guides.map(guide => {
6768
const guidePageForCurrentPath = nodeForPath(rootNode, [
6869
'platforms',
@@ -71,7 +72,7 @@ export async function Sidebar({path, versions}: SidebarProps) {
7172
guide.name,
7273
...path.slice(currentGuide ? 4 : 2),
7374
]);
74-
return guidePageForCurrentPath
75+
return guidePageForCurrentPath && !guidePageForCurrentPath.missing
7576
? {
7677
...guide,
7778
url: '/' + guidePageForCurrentPath.path + '/',

0 commit comments

Comments
 (0)