diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 7f6a22b6494dca..5e8771ff94935b 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -1391,7 +1391,7 @@ export function __unstableIsLastBlockChangeIgnored( state ) { * @return {Object} Subsets of block attributes changed, keyed * by block client ID. */ -export function __experimentalGetLastBlockAttributesChange( state ) { +export function __experimentalGetLastBlockAttributeChanges( state ) { return state.lastBlockAttributesChange; } diff --git a/packages/block-editor/src/store/test/selectors.js b/packages/block-editor/src/store/test/selectors.js index 1b6db908dc0be8..4e1289e44aefc3 100644 --- a/packages/block-editor/src/store/test/selectors.js +++ b/packages/block-editor/src/store/test/selectors.js @@ -58,7 +58,7 @@ const { getTemplate, getTemplateLock, getBlockListSettings, - __experimentalGetLastBlockAttributesChange, + __experimentalGetLastBlockAttributeChanges, INSERTER_UTILITY_HIGH, INSERTER_UTILITY_MEDIUM, INSERTER_UTILITY_LOW, @@ -2440,7 +2440,7 @@ describe( 'selectors', () => { } ); } ); - describe( '__experimentalGetLastBlockAttributesChange', () => { + describe( '__experimentalGetLastBlockAttributeChanges', () => { it( 'returns the last block attributes change', () => { const state = { lastBlockAttributesChange: { @@ -2448,7 +2448,7 @@ describe( 'selectors', () => { }, }; - const result = __experimentalGetLastBlockAttributesChange( state ); + const result = __experimentalGetLastBlockAttributeChanges( state ); expect( result ).toEqual( { block1: { fruit: 'bananas' }, diff --git a/packages/editor/src/store/actions.js b/packages/editor/src/store/actions.js index e6ffbff4d5483b..ae31857cad45c5 100644 --- a/packages/editor/src/store/actions.js +++ b/packages/editor/src/store/actions.js @@ -905,7 +905,7 @@ export function unlockPostSaving( lockName ) { * @return {Object} Action object */ export function* resetEditorBlocks( blocks, options = {} ) { - const lastBlockAttributesChange = yield select( 'core/block-editor', '__experimentalGetLastBlockAttributesChange' ); + const lastBlockAttributesChange = yield select( 'core/block-editor', '__experimentalGetLastBlockAttributeChanges' ); // Sync to sources from block attributes updates. if ( lastBlockAttributesChange ) {