diff --git a/packages/block-editor/src/components/block-edit/with-block-bindings-attributes.js b/packages/block-editor/src/components/block-edit/with-block-bindings-attributes.js index 602bb65a85d29d..98d3af68776efe 100644 --- a/packages/block-editor/src/components/block-edit/with-block-bindings-attributes.js +++ b/packages/block-editor/src/components/block-edit/with-block-bindings-attributes.js @@ -72,9 +72,9 @@ export const withBlockBindingSupport = createHigherOrderComponent( () => replacePatternOverrideDefaultBindings( name, - props.attributes.metadata?.bindings + props.attributes?.metadata?.bindings ), - [ props.attributes.metadata?.bindings, name ] + [ props.attributes?.metadata?.bindings, name ] ); // While this hook doesn't directly call any selectors, `useSelect` is @@ -160,7 +160,7 @@ export const withBlockBindingSupport = createHigherOrderComponent( const hasParentPattern = !! updatedContext[ 'pattern/overrides' ]; const hasPatternOverridesDefaultBinding = - props.attributes.metadata?.bindings?.[ DEFAULT_ATTRIBUTE ] + props.attributes?.metadata?.bindings?.[ DEFAULT_ATTRIBUTE ] ?.source === 'core/pattern-overrides'; const _setAttributes = useCallback(