Skip to content

Commit

Permalink
Make sure blockType is defined before trying to use it
Browse files Browse the repository at this point in the history
  • Loading branch information
mattsherman committed Jul 10, 2024
1 parent b4711e7 commit 4aeb568
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 4aeb568

Please sign in to comment.