Skip to content

Commit

Permalink
Inner Blocks: Fix provides context condition (#46729)
Browse files Browse the repository at this point in the history
  • Loading branch information
Mamaduka authored Dec 22, 2022
1 parent 972c0ce commit d5b4116
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions packages/block-editor/src/components/inner-blocks/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -87,8 +87,10 @@ function UncontrolledInnerBlocks( props ) {

const blockType = getBlockType( block.name );

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

return {
Expand Down

0 comments on commit d5b4116

Please sign in to comment.