diff --git a/packages/block-editor/src/components/global-styles/dimensions-panel.js b/packages/block-editor/src/components/global-styles/dimensions-panel.js index 59f3035d88d92c..6d189e6b83255e 100644 --- a/packages/block-editor/src/components/global-styles/dimensions-panel.js +++ b/packages/block-editor/src/components/global-styles/dimensions-panel.js @@ -79,7 +79,7 @@ function useHasChildLayout( settings ) { type: parentLayoutType = 'default', default: { type: defaultParentLayoutType = 'default' } = {}, allowSizingOnChildren = false, - } = settings?.parentLayout; + } = settings?.parentLayout ?? {}; const support = ( defaultParentLayoutType === 'flex' || parentLayoutType === 'flex' ) && @@ -328,7 +328,7 @@ export default function DimensionsPanel( { // Child Layout const showChildLayoutControl = useHasChildLayout( settings ); const childLayout = inheritedValue?.layout; - const { orientation = 'horizontal' } = settings?.parentLayout; + const { orientation = 'horizontal' } = settings?.parentLayout ?? {}; const childLayoutOrientationLabel = orientation === 'horizontal' ? __( 'Width' ) : __( 'Height' ); const setChildLayout = ( newChildLayout ) => {