Skip to content

Commit

Permalink
Hide media tab when blocks should also be hidden
Browse files Browse the repository at this point in the history
  • Loading branch information
priethor committed Feb 21, 2024
1 parent 4793bd6 commit 6349a77
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/block-editor/src/components/inserter/menu.js
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,7 @@ function InserterMenu(
);

const mediaCategories = useMediaCategories( destinationRootClientId );
const showMedia = mediaCategories.length > 0;
const showMedia = mediaCategories.length > 0 && showBlocks;

const onInsert = useCallback(
( blocks, meta, shouldForceFocusBlock ) => {
Expand Down

0 comments on commit 6349a77

Please sign in to comment.