From f73bec6b34824bc88e31c1399396b07e06f7a2b3 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Tue, 11 May 2021 09:26:53 +0300 Subject: [PATCH] [Inserter]: Hide patterns tab if no patterns are available --- packages/block-editor/src/components/inserter/menu.js | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/packages/block-editor/src/components/inserter/menu.js b/packages/block-editor/src/components/inserter/menu.js index 13dda883f5b94a..9db480c49d5b09 100644 --- a/packages/block-editor/src/components/inserter/menu.js +++ b/packages/block-editor/src/components/inserter/menu.js @@ -54,11 +54,9 @@ function InserterMenu( { ); return { - showPatterns: - ! destinationRootClientId || - !! __experimentalGetAllowedPatterns( - destinationRootClientId - ).length, + showPatterns: !! __experimentalGetAllowedPatterns( + destinationRootClientId + ).length, hasReusableBlocks: !! getSettings().__experimentalReusableBlocks ?.length, };