Skip to content

Commit

Permalink
Don't use wordpress/warning package for displaying the warning becaus…
Browse files Browse the repository at this point in the history
…e it's not going to work in the browser. It's intended to be used with Node.
  • Loading branch information
anton-vlasenko committed Oct 27, 2021
1 parent 1dd6bbc commit 70ed0ed
Show file tree
Hide file tree
Showing 3 changed files with 1 addition and 4 deletions.
1 change: 0 additions & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion packages/edit-navigation/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,6 @@
"@wordpress/media-utils": "file:../media-utils",
"@wordpress/notices": "file:../notices",
"@wordpress/url": "file:../url",
"@wordpress/warning": "file:../warning",
"classnames": "^2.3.1",
"lodash": "^4.17.21",
"rememo": "^3.0.0",
Expand Down
3 changes: 1 addition & 2 deletions packages/edit-navigation/src/store/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import { difference, zip } from 'lodash';
import { __, sprintf } from '@wordpress/i18n';
import { store as noticesStore } from '@wordpress/notices';
import { store as coreDataStore } from '@wordpress/core-data';
import { default as logWarning } from '@wordpress/warning';

/**
* Internal dependencies
Expand Down Expand Up @@ -210,7 +209,7 @@ const batchUpdateMenuItems = ( navigationBlock, menuId ) => async ( {
.filter( ( { block } ) => ! isBlockSupportedInNav( block ) )
.map( ( { block } ) => block.name );
if ( unsupportedMenuItems.length ) {
logWarning(
window.console.warn(
sprintf(
// translators: %s: Name of block (i.e. core/legacy-widget)
__(
Expand Down

0 comments on commit 70ed0ed

Please sign in to comment.