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 authored and ockham committed Oct 4, 2022
1 parent 5ce4f2a commit 23a3b26
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 23a3b26

Please sign in to comment.