Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
Apply suggestions from code review
Co-Authored-By: gziolo <grzegorz@gziolo.pl>
  • Loading branch information
gziolo authored Mar 28, 2019
commit c6cf8023f719e0e3c3d7919ebe0ba8e2649b0720
2 changes: 1 addition & 1 deletion packages/blocks/src/api/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -98,7 +98,7 @@ export function registerBlockType( name, settings ) {
settings = applyFilters( 'blocks.registerBlockType', settings, name );
if ( ! isPlainObject( settings ) ) {
console.error(
'Block settings need to remain a plain object after all "blocks.registerBlockType" filters are applied.'
'Block settings must be a valid object.'
);
return;
}
Expand Down
2 changes: 1 addition & 1 deletion packages/blocks/src/api/test/registration.js
Original file line number Diff line number Diff line change
Expand Up @@ -332,7 +332,7 @@ describe( 'blocks', () => {
return [ settings ];
} );
const block = registerBlockType( 'my-plugin/fancy-block-13', defaultBlockSettings );
expect( console ).toHaveErroredWith( 'Block settings need to remain a plain object after all "blocks.registerBlockType" filters are applied.' );
expect( console ).toHaveErroredWith( 'Block settings must be a valid object.' );
expect( block ).toBeUndefined();
} );
} );
Expand Down