diff --git a/packages/block-editor/src/components/url-popover/image-url-input-ui.js b/packages/block-editor/src/components/url-popover/image-url-input-ui.js index a7b40b42f6dd7..8209ff1939f09 100644 --- a/packages/block-editor/src/components/url-popover/image-url-input-ui.js +++ b/packages/block-editor/src/components/url-popover/image-url-input-ui.js @@ -272,7 +272,7 @@ const ImageURLInputUI = ( { icon={ linkOff } label={ __( 'Disable expand on click' ) } onClick={ () => { - onSetLightbox( false ); + onSetLightbox?.( false ); } } size="compact" /> @@ -302,7 +302,7 @@ const ImageURLInputUI = ( { label={ __( 'Remove link' ) } onClick={ () => { onLinkRemove(); - resetLightbox(); + resetLightbox?.(); } } size="compact" /> @@ -366,7 +366,7 @@ const ImageURLInputUI = ( { LINK_DESTINATION_NONE, href: '', } ); - onSetLightbox( true ); + onSetLightbox?.( true ); stopEditLink(); } } >