Skip to content

Commit

Permalink
Fix empty title issue
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka committed Nov 28, 2021
1 parent c7fec94 commit 4adb507
Showing 1 changed file with 1 addition and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ export default function RenameMenuItem( { template, onClose } ) {
<MenuItem
onClick={ () => {
setIsModalOpen( true );
setTitle( template.title.rendered );
} }
>
{ __( 'Rename' ) }
Expand All @@ -89,7 +90,6 @@ export default function RenameMenuItem( { template, onClose } ) {
closeLabel={ __( 'Close' ) }
onRequestClose={ () => {
setIsModalOpen( false );
setTitle( '' );
} }
overlayClassName="edit-site-list__rename-modal"
>
Expand All @@ -115,7 +115,6 @@ export default function RenameMenuItem( { template, onClose } ) {
variant="tertiary"
onClick={ () => {
setIsModalOpen( false );
setTitle( '' );
} }
>
{ __( 'Cancel' ) }
Expand Down

0 comments on commit 4adb507

Please sign in to comment.