Skip to content

Commit

Permalink
Template editor: fix crashes due to undefined vars (#44482)
Browse files Browse the repository at this point in the history
  • Loading branch information
glendaviesnz committed Sep 28, 2022
1 parent 090d2e0 commit b5aacb3
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 3 deletions.
Expand Up @@ -83,10 +83,10 @@ export default function BlockParentSelector() {
label={ sprintf(
/* translators: %s: Name of the block's parent. */
__( 'Select %s' ),
blockInformation.title
blockInformation?.title
) }
showTooltip
icon={ <BlockIcon icon={ blockInformation.icon } /> }
icon={ <BlockIcon icon={ blockInformation?.icon } /> }
/>
</div>
);
Expand Down
Expand Up @@ -226,7 +226,7 @@ function BlockPopoverInbetween( {
forcePopoverRecompute
);
return () => {
previousElement.ownerDocument.defaultView.removeEventListener(
previousElement.ownerDocument.defaultView?.removeEventListener(
'resize',
forcePopoverRecompute
);
Expand Down

0 comments on commit b5aacb3

Please sign in to comment.