Skip to content

Commit

Permalink
Block Editor: Hide the 'Content' panel for locked blocks when there's…
Browse files Browse the repository at this point in the history
… no content
  • Loading branch information
Mamaduka committed Jan 25, 2024
1 parent 9508cc0 commit 476174a
Showing 1 changed file with 5 additions and 3 deletions.
8 changes: 5 additions & 3 deletions packages/block-editor/src/components/block-inspector/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -56,9 +56,11 @@ function BlockInspectorLockedBlocks( { topLevelLockedBlock } ) {
/>
<BlockVariationTransforms blockClientId={ topLevelLockedBlock } />
<BlockInfo.Slot />
<PanelBody title={ __( 'Content' ) }>
<BlockQuickNavigation clientIds={ contentClientIds } />
</PanelBody>
{ contentClientIds.length > 0 && (
<PanelBody title={ __( 'Content' ) }>
<BlockQuickNavigation clientIds={ contentClientIds } />
</PanelBody>
) }
</div>
);
}
Expand Down

0 comments on commit 476174a

Please sign in to comment.