Skip to content

Commit

Permalink
Fix lint errors
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin940726 committed May 2, 2024
1 parent 8b4ae5e commit 04ba4e8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -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' ) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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',
Expand Down Expand Up @@ -63,7 +65,9 @@ function ContentOnlySettingsMenuItems( { clientId } ) {
[ clientId ]
);

if ( ! entity ) return null;
if ( ! entity ) {
return null;
}

const isPattern = entity.type === 'wp_block';

Expand Down

0 comments on commit 04ba4e8

Please sign in to comment.