From c42e4d1f034ce0b2baa9a2b56cc964da227e1001 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ella=20van=C2=A0Durpe?= Date: Wed, 19 May 2021 21:32:51 +0300 Subject: [PATCH] Rich text: remove inline display warning --- packages/block-library/src/file/edit.js | 3 +-- .../src/query-pagination-next/edit.js | 1 - .../src/query-pagination-previous/edit.js | 1 - .../src/site-title/edit/index.js | 1 - packages/rich-text/src/component/index.js | 2 -- .../src/component/use-inline-warning.js | 24 ------------------- 6 files changed, 1 insertion(+), 31 deletions(-) delete mode 100644 packages/rich-text/src/component/use-inline-warning.js diff --git a/packages/block-library/src/file/edit.js b/packages/block-library/src/file/edit.js index ad76a1c86f55c..b23502186e687 100644 --- a/packages/block-library/src/file/edit.js +++ b/packages/block-library/src/file/edit.js @@ -274,8 +274,7 @@ function FileEdit( { ) }
{ - if ( process.env.NODE_ENV === 'development' ) { - const target = ref.current; - const { defaultView } = target.ownerDocument; - const computedStyle = defaultView.getComputedStyle( target ); - - if ( computedStyle.display === 'inline' ) { - // eslint-disable-next-line no-console - console.error( message ); - } - } - }, [] ); - return ref; -}