Skip to content

Commit

Permalink
fix the go to for non pages by showing it only for pages (#53408)
Browse files Browse the repository at this point in the history
  • Loading branch information
draganescu authored and tellthemachines committed Aug 14, 2023
1 parent ae17ef7 commit 1990bb8
Showing 1 changed file with 11 additions and 10 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -126,16 +126,17 @@ export default function LeafMoreMenu( props ) {
>
{ __( 'Move down' ) }
</MenuItem>
{ block.attributes?.id && (
<MenuItem
onClick={ () => {
onGoToPage( block );
onClose();
} }
>
{ goToLabel }
</MenuItem>
) }
{ block.attributes?.type === 'page' &&
block.attributes?.id && (
<MenuItem
onClick={ () => {
onGoToPage( block );
onClose();
} }
>
{ goToLabel }
</MenuItem>
) }
</MenuGroup>
<MenuGroup>
<MenuItem
Expand Down

0 comments on commit 1990bb8

Please sign in to comment.