Skip to content

Commit

Permalink
Remove check to see if the block has a url, as it should never have a…
Browse files Browse the repository at this point in the history
… URL from the appender insertion
  • Loading branch information
jeryj committed May 19, 2023
1 parent 8f45485 commit 8c6122c
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -85,17 +85,14 @@ const MainContent = ( {
lastInsertedBlock,
setLastInsertedBlock
) => {
const blockHasExistingLinkValue = !! lastInsertedBlock?.url;
const blockSupportsLinkUI = BLOCKS_WITH_LINK_UI_SUPPORT?.includes(
lastInsertedBlock?.name
);
const currentBlockWasJustInserted =
lastInsertedBlock?.clientId === currentBlock.clientId;

const shouldShowLinkUIForBlock =
blockSupportsLinkUI &&
! blockHasExistingLinkValue && // don't re-show the Link UI if the block already has a link value.
currentBlockWasJustInserted;
blockSupportsLinkUI && currentBlockWasJustInserted;

return (
shouldShowLinkUIForBlock && (
Expand Down

0 comments on commit 8c6122c

Please sign in to comment.