Skip to content

Commit

Permalink
rename const name
Browse files Browse the repository at this point in the history
  • Loading branch information
retrofox committed Apr 1, 2024
1 parent 5a4c53d commit 1cec195
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions packages/block-editor/src/hooks/use-bindings-attributes.js
Original file line number Diff line number Diff line change
Expand Up @@ -189,18 +189,18 @@ function BlockBindingBridge( { blockProps, bindings, onPropValueChange } ) {
*/
const allowBindings = Object.entries( bindings ).reduce(
( acc, [ attrName, settings ] ) => {
const source = blockBindingsSources[ settings.source ];
const handler = blockBindingsSources[ settings.source ];
// Check if the block has a valid source handler.
if ( ! source?.useSource ) {
if ( ! handler?.useSource ) {
return false;
}

// Check if the attribute can be bound.
const allowBlocks = source?.settings?.blocks;
const allowBlocks = handler?.settings?.blocks;
if ( canBindAttribute( blockProps.name, attrName, allowBlocks ) ) {
acc[ attrName ] = {
...settings,
handler: source, // populate the source handler.
handler, // populate the source handler.
};
}

Expand Down

0 comments on commit 1cec195

Please sign in to comment.