Skip to content

Commit

Permalink
Fix check for title.rendered when title.rendered might not be available
Browse files Browse the repository at this point in the history
  • Loading branch information
jeryj authored and getdave committed Jul 26, 2023
1 parent 37522c9 commit 7ed9723
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ function NavigationMenuSelector( {
return (
navigationMenus?.map( ( { id, title, status }, index ) => {
const label = buildMenuLabel(
title.rendered,
title?.rendered,
index + 1,
status
);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -124,7 +124,7 @@ export default function SidebarNavigationScreenNavigationMenus() {
withChevron
icon={ navigation }
>
{ buildMenuLabel( title.rendered, index + 1, status ) }
{ buildMenuLabel( title?.rendered, index + 1, status ) }
</NavMenuItem>
) ) }
</ItemGroup>
Expand Down

0 comments on commit 7ed9723

Please sign in to comment.