Skip to content

Commit 2efa011

Browse files
fix: broken links in Ecosystem page (#979)
1 parent f3cd7b0 commit 2efa011

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

components/Nav/SidebarMenus.tsx

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import Link, { StyledLink } from '../Link';
88
const { pages } = json;
99

1010
export interface SimpleSidebarMenuProps {
11-
pages?: { title: string; pathname: string; sections: { title: string }[]; href: string }[];
11+
pages?: { title: string; pathname?: string; sections: { title: string }[]; href: string }[];
1212
}
1313

1414
export const SimpleSidebarMenu = ({ pages = [] }: SimpleSidebarMenuProps) => {
@@ -91,6 +91,6 @@ export const DocsSidebarMenu = (props: DocsSidebarMenuProps) => {
9191
);
9292
};
9393

94-
function getSectionPath(parentPathname: string, title: string) {
95-
return `${parentPathname}#${titleToDash(title)}`;
94+
function getSectionPath(parentPathname: string | undefined, title: string) {
95+
return `${parentPathname ?? ''}#${titleToDash(title)}`;
9696
}

0 commit comments

Comments
 (0)