Skip to content

Commit

Permalink
Update packages/edit-navigation/src/components/layout/use-navigation-…
Browse files Browse the repository at this point in the history
…block-with-name.js

Co-authored-by: Robert Anderson <[email protected]>
  • Loading branch information
draganescu and noisysocks authored Sep 28, 2020
1 parent 377e0cf commit f78c3c4
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,9 @@ export default function useNavigationBlockWithName( { menuId } ) {
<EditInPlaceControl
label={ menu?.name ?? '(untitled menu)' }
onChange={ ( value ) => {
if ( value === '' ) {
value = null;
}
saveMenu( {
...menu,
name: value ?? '(untitled menu)',
name: value || '(untitled menu)',
} );
} }
/>
Expand Down

0 comments on commit f78c3c4

Please sign in to comment.