Skip to content

Commit 03b913f

Browse files
cbravobernalockhamMamaduka
authored andcommitted
Block Bindings: Error handling for external sources. (#72585)
Co-authored-by: cbravobernal <cbravobernal@git.wordpress.org> Co-authored-by: ockham <bernhard-reiter@git.wordpress.org> Co-authored-by: Mamaduka <mamaduka@git.wordpress.org>
1 parent 48171a0 commit 03b913f

File tree

1 file changed

+11
-7
lines changed

1 file changed

+11
-7
lines changed

packages/block-editor/src/hooks/block-bindings.js

Lines changed: 11 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -114,13 +114,17 @@ function BlockBindingsPanelMenuContent( { attribute, binding, sources } ) {
114114
key: item.key,
115115
},
116116
};
117-
const values = source.getValues( {
118-
select,
119-
context: blockContext,
120-
bindings: {
121-
[ attribute ]: itemBindings,
122-
},
123-
} );
117+
let values = {};
118+
try {
119+
values = source.getValues( {
120+
select,
121+
context: blockContext,
122+
bindings: {
123+
[ attribute ]: itemBindings,
124+
},
125+
} );
126+
} catch ( e ) {}
127+
124128
return (
125129
<Menu.CheckboxItem
126130
key={

0 commit comments

Comments
 (0)