File tree Expand file tree Collapse file tree 1 file changed +3
-3
lines changed
Expand file tree Collapse file tree 1 file changed +3
-3
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ import Link, { StyledLink } from '../Link';
88const { pages } = json ;
99
1010export 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
1414export 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}
You can’t perform that action at this time.
0 commit comments