From 629056cb5aca475c226a5d540b4bbc807fe1df82 Mon Sep 17 00:00:00 2001 From: Mario Santos Date: Tue, 28 May 2024 10:59:02 +0200 Subject: [PATCH] Unlock private selector and action --- packages/block-editor/src/store/actions.js | 6 +++--- packages/block-editor/src/store/selectors.js | 4 +++- 2 files changed, 6 insertions(+), 4 deletions(-) diff --git a/packages/block-editor/src/store/actions.js b/packages/block-editor/src/store/actions.js index 6e65ce5101332a..78df2e6957eb3c 100644 --- a/packages/block-editor/src/store/actions.js +++ b/packages/block-editor/src/store/actions.js @@ -213,9 +213,9 @@ export const updateBlockAttributes = } ); if ( updatesBySource.size ) { - const context = registry - .select( STORE_NAME ) - .getBlockContext( clientId ); + const context = unlock( + registry.select( STORE_NAME ) + ).getBlockContext( clientId ); for ( const [ source, boundAttributes ] of updatesBySource ) { if ( source.setValues ) { source.setValues( { diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 4ac15ddc89f382..38374864a62bb3 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -146,7 +146,9 @@ export const getBlockAttributes = createRegistrySelector( isProcessingBindings = true; const newAttributes = { ...blockAttributes }; - const context = select( STORE_NAME ).getBlockContext( clientId ); + const context = unlock( select( STORE_NAME ) ).getBlockContext( + clientId + ); const sources = unlock( select( blocksStore ) ).getAllBlockBindingsSources();