Skip to content

Commit

Permalink
Add safety check in case bindings don't exist (#62268)
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot authored and ellatrix committed Jun 11, 2024
1 parent 952532e commit 3314d51
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 3314d51

Please sign in to comment.