Skip to content

Commit

Permalink
Disable rule violation in the @wordpress/server-side-render component
Browse files Browse the repository at this point in the history
  • Loading branch information
gziolo committed Jun 18, 2021
1 parent c2ef304 commit 58aab25
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions packages/server-side-render/src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,9 @@ import ServerSideRender from './server-side-render';
const EMPTY_OBJECT = {};

const ExportedServerSideRender = withSelect( ( select ) => {
// FIXME: @wordpress/server-side-render should not depend on @wordpress/editor.
// It is used by blocks that can be loaded into a *non-post* block editor.
// eslint-disable-next-line @wordpress/data-no-store-string-literals
const coreEditorSelect = select( 'core/editor' );
if ( coreEditorSelect ) {
const currentPostId = coreEditorSelect.getCurrentPostId();
Expand Down

0 comments on commit 58aab25

Please sign in to comment.