From b0629546181c6f6fc05bf88edffe3a35d290ad6b Mon Sep 17 00:00:00 2001 From: Mario Santos Date: Sat, 28 Sep 2024 10:40:46 +0200 Subject: [PATCH] Fix `setValues` --- packages/block-editor/src/hooks/use-bindings-attributes.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/packages/block-editor/src/hooks/use-bindings-attributes.js b/packages/block-editor/src/hooks/use-bindings-attributes.js index 29f9b0621bfa7c..fdc617fda20c05 100644 --- a/packages/block-editor/src/hooks/use-bindings-attributes.js +++ b/packages/block-editor/src/hooks/use-bindings-attributes.js @@ -201,7 +201,7 @@ export const withBlockBindingSupport = createHigherOrderComponent( const _setAttributes = useCallback( ( nextAttributes ) => { - registry.batch( ( select, dispatch ) => { + registry.batch( () => { if ( ! blockBindings ) { setAttributes( nextAttributes ); return; @@ -242,8 +242,8 @@ export const withBlockBindingSupport = createHigherOrderComponent( bindings, ] of blockBindingsBySource ) { source.setValues( { - select, - dispatch, + select: registry.select, + dispatch: registry.dispatch, context: updatedContext, clientId, bindings,