Skip to content

Commit

Permalink
Make sure blockType is defined before trying to use it (#63351)
Browse files Browse the repository at this point in the history
Co-authored-by: mattsherman <mattormeeple@git.wordpress.org>
  • Loading branch information
mattsherman and mattsherman committed Jul 10, 2024
1 parent 28e9e41 commit 6b53293
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -132,7 +132,10 @@ function UncontrolledInnerBlocks( props ) {
/>
);

if ( Object.keys( blockType.providesContext ).length === 0 ) {
if (
! blockType?.providesContext ||
Object.keys( blockType.providesContext ).length === 0
) {
return items;
}

Expand Down

0 comments on commit 6b53293

Please sign in to comment.