diff --git a/packages/block-editor/src/hooks/layout.js b/packages/block-editor/src/hooks/layout.js index 8b7527a28a0721..4a4a6ee7ffd240 100644 --- a/packages/block-editor/src/hooks/layout.js +++ b/packages/block-editor/src/hooks/layout.js @@ -194,7 +194,7 @@ export const withLayoutStyles = createHigherOrderComponent( const { name, attributes } = props; const supportLayout = hasBlockSupport( name, '__experimentalLayout' ); const id = useInstanceId( BlockListBlock ); - const defaultLayout = useEditorFeature( 'layout' ); + const defaultLayout = useEditorFeature( 'layout' ) || {}; if ( ! supportLayout ) { return ; } diff --git a/packages/block-library/src/group/edit.js b/packages/block-library/src/group/edit.js index 9a27a481dfb30a..9c2355dc7c3a99 100644 --- a/packages/block-library/src/group/edit.js +++ b/packages/block-library/src/group/edit.js @@ -25,7 +25,7 @@ function GroupEdit( { attributes, setAttributes, clientId } ) { }, [ clientId ] ); - const defaultLayout = useEditorFeature( 'layout' ); + const defaultLayout = useEditorFeature( 'layout' ) || {}; const { tagName: TagName = 'div', templateLock, layout = {} } = attributes; const usedLayout = !! layout && layout.inherit ? defaultLayout : layout; const { contentSize, wideSize } = usedLayout; diff --git a/packages/block-library/src/post-content/edit.js b/packages/block-library/src/post-content/edit.js index d583ffc1c49c9b..fcdb14198d7b10 100644 --- a/packages/block-library/src/post-content/edit.js +++ b/packages/block-library/src/post-content/edit.js @@ -16,7 +16,7 @@ function Content( { layout, postType, postId } ) { const { getSettings } = select( blockEditorStore ); return getSettings()?.supportsLayout; }, [] ); - const defaultLayout = useEditorFeature( 'layout' ); + const defaultLayout = useEditorFeature( 'layout' ) || {}; const usedLayout = !! layout && layout.inherit ? defaultLayout : layout; const { contentSize, wideSize } = usedLayout; const alignments =