Skip to content

Commit

Permalink
Only pass usesContext properties to block bindings editor APIs (#65661)
Browse files Browse the repository at this point in the history
Co-authored-by: SantosGuillamot <santosguillamot@git.wordpress.org>
Co-authored-by: gziolo <gziolo@git.wordpress.org>
  • Loading branch information
3 people authored Sep 25, 2024
1 parent e321b5a commit 1bf76cc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/block-editor/src/hooks/use-bindings-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ export const withBlockBindingSupport = createHigherOrderComponent(
// used purposely here to ensure `boundAttributes` is updated whenever
// there are attribute updates.
// `source.getValues` may also call a selector via `registry.select`.
const updatedContext = { ...context };
const updatedContext = {};
const boundAttributes = useSelect( () => {
if ( ! blockBindings ) {
return;
Expand Down Expand Up @@ -285,7 +285,7 @@ export const withBlockBindingSupport = createHigherOrderComponent(
{ ...props }
attributes={ { ...props.attributes, ...boundAttributes } }
setAttributes={ _setAttributes }
context={ updatedContext }
context={ { ...context, ...updatedContext } }
/>
</>
);
Expand Down

0 comments on commit 1bf76cc

Please sign in to comment.