diff --git a/packages/block-editor/src/utils/block-bindings.js b/packages/block-editor/src/utils/block-bindings.js index 788f90877bc24f..b3daf4f4b36b43 100644 --- a/packages/block-editor/src/utils/block-bindings.js +++ b/packages/block-editor/src/utils/block-bindings.js @@ -48,9 +48,8 @@ export function useBlockBindingsUtils() { * ``` */ const updateBlockBindings = ( bindings ) => { - const { - metadata: { bindings: currentBindings, ...metadata }, - } = getBlockAttributes( clientId ); + const { metadata: { bindings: currentBindings, ...metadata } = {} } = + getBlockAttributes( clientId ); const newBindings = { ...currentBindings }; Object.entries( bindings ).forEach( ( [ attribute, binding ] ) => { @@ -87,9 +86,8 @@ export function useBlockBindingsUtils() { * ``` */ const removeAllBlockBindings = () => { - const { - metadata: { bindings, ...metadata }, - } = getBlockAttributes( clientId ); + const { metadata: { bindings, ...metadata } = {} } = + getBlockAttributes( clientId ); updateBlockAttributes( clientId, { metadata: isObjectEmpty( metadata ) ? undefined : metadata, } );