diff --git a/packages/block-library/src/navigation-link/edit.js b/packages/block-library/src/navigation-link/edit.js index c208d83c1a45e5..1bddb6cb3800db 100644 --- a/packages/block-library/src/navigation-link/edit.js +++ b/packages/block-library/src/navigation-link/edit.js @@ -844,7 +844,8 @@ export default function NavigationLinkEdit( { setIsLinkOpen( false ) } - anchorRef={ listItemRef.current } + // `anchor` should never be `null` + anchor={ listItemRef.current ?? undefined } shift > setIsLinkOpen( false ) } - anchorRef={ listItemRef.current } + // `anchor` should never be `null` + anchor={ listItemRef.current ?? undefined } shift >