Skip to content
Merged
Changes from 1 commit
Commits
Show all changes
20 commits
Select commit Hold shift + click to select a range
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Change how label is managed
  • Loading branch information
SantosGuillamot committed Jul 22, 2024
commit a81c1764ab353960dde0bf29f82a911c0f2687f6
25 changes: 0 additions & 25 deletions packages/blocks/src/api/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -815,31 +815,6 @@ export const registerBlockBindingsSource = ( source ) => {
return;
}

// Check the properties from the server aren't overriden.
if ( existingSource ) {
/*
* It is not possible to just check the properties with a value because
* in some of them, like `canUserEditValue`, a default one could be used.
*/
const serverProperties = [ 'label', 'usesContext' ];
let shouldReturn = false;
serverProperties.forEach( ( property ) => {
if ( existingSource[ property ] && source[ property ] ) {
console.error(
'Block bindings "' +
name +
'" source "' +
property +
'" is already defined in the server.'
);
shouldReturn = true;
}
} );
if ( shouldReturn ) {
return;
}
}

// Check the `name` property is correct.
if ( ! name ) {
warning( 'Block bindings source must contain a name.' );
Expand Down