From 04ba4e88173c33d883679c968b1c8b87bb942926 Mon Sep 17 00:00:00 2001 From: Kai Hao Date: Thu, 2 May 2024 16:20:12 +0800 Subject: [PATCH] Fix lint errors --- .../src/components/template-part-converter/index.js | 4 +++- .../block-settings-menu/content-only-settings-menu.js | 8 ++++++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/packages/edit-site/src/components/template-part-converter/index.js b/packages/edit-site/src/components/template-part-converter/index.js index ac679e8de6d6b..de47eb6ae26f4 100644 --- a/packages/edit-site/src/components/template-part-converter/index.js +++ b/packages/edit-site/src/components/template-part-converter/index.js @@ -42,7 +42,9 @@ function TemplatePartConverterMenuItem( { clientIds, onClose } ) { ); // Do not show the convert button if the block is in content-only mode. - if ( isContentOnly ) return null; + if ( isContentOnly ) { + return null; + } // Allow converting a single template part to standard blocks. if ( blocks.length === 1 && blocks[ 0 ]?.name === 'core/template-part' ) { diff --git a/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js b/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js index 232ef0eafe6fa..61da7356f5e64 100644 --- a/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js +++ b/packages/editor/src/components/block-settings-menu/content-only-settings-menu.js @@ -27,7 +27,9 @@ function ContentOnlySettingsMenuItems( { clientId } ) { } = select( blockEditorStore ); const contentOnly = getBlockEditingMode( clientId ) === 'contentOnly'; - if ( ! contentOnly ) return {}; + if ( ! contentOnly ) { + return {}; + } const patternParent = getBlockParentsByBlockName( clientId, 'core/block', @@ -63,7 +65,9 @@ function ContentOnlySettingsMenuItems( { clientId } ) { [ clientId ] ); - if ( ! entity ) return null; + if ( ! entity ) { + return null; + } const isPattern = entity.type === 'wp_block';