Skip to content

Commit

Permalink
Fixes WordPress#11949: Error: The block "xxx" can have a maximum of 3…
Browse files Browse the repository at this point in the history
… keywords.
  • Loading branch information
jameelmoses committed Nov 17, 2018
1 parent f4ad4ad commit da3dfcc
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/blocks/src/api/registration.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/* eslint no-console: [ 'error', { allow: [ 'error' ] } ] */
/* eslint no-console: [ 'error', { allow: [ 'error', 'warn' ] } ] */

/**
* External dependencies
Expand Down Expand Up @@ -141,7 +141,7 @@ export function registerBlockType( name, settings ) {
}

if ( 'keywords' in settings && settings.keywords.length > 3 ) {
console.error(
console.warn(
'The block "' + name + '" can have a maximum of 3 keywords.'
);
settings.keywords = settings.keywords.slice( 0, 3 );
Expand Down

0 comments on commit da3dfcc

Please sign in to comment.