Skip to content

Commit

Permalink
Add safety check in case bindings don't exist
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot committed Jun 4, 2024
1 parent da98bdb commit c6031b9
Showing 1 changed file with 3 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,9 @@ export default function BlockBindingsToolbarIndicator( { clientIds } ) {
isConnectedToPatternOverrides: getBlocksByClientId(
clientIds
).some( ( block ) =>
Object.values( block?.attributes.metadata?.bindings ).some(
Object.values(
block?.attributes?.metadata?.bindings || {}
).some(
( binding ) =>
binding.source === 'core/pattern-overrides'
)
Expand Down

0 comments on commit c6031b9

Please sign in to comment.