Skip to content

Commit

Permalink
Add test for menu being empty and display notice (#50870)
Browse files Browse the repository at this point in the history
  • Loading branch information
getdave committed May 23, 2023
1 parent a2d8295 commit 447126e
Showing 1 changed file with 9 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -63,6 +63,15 @@ export default function SidebarNavigationScreenNavigationMenu() {
);
}

if ( ! navigationMenu?.content?.raw ) {
return (
<SidebarNavigationScreenWrapper
title={ decodeEntities( menuTitle ) }
description={ __( 'This Navigation Menu is empty.' ) }
/>
);
}

return (
<SidebarNavigationScreenWrapper
title={ decodeEntities( menuTitle ) }
Expand Down

0 comments on commit 447126e

Please sign in to comment.