Skip to content

Commit

Permalink
Add safety check in case bindings don't exist (WordPress#62268)
Browse files Browse the repository at this point in the history
  • Loading branch information
SantosGuillamot authored and patil-vipul committed Jun 17, 2024
1 parent f7b5c26 commit a297d2b
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 a297d2b

Please sign in to comment.