From 2ec7a03e43d76eadb071d89dec70c7a7c7fd6545 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Andr=C3=A9?= <583546+oandregal@users.noreply.github.com> Date: Fri, 18 Oct 2024 13:07:11 +0200 Subject: [PATCH] Be explicit about the check --- packages/block-editor/src/store/selectors.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/block-editor/src/store/selectors.js b/packages/block-editor/src/store/selectors.js index 210cd26aeaa95..df138f566a466 100644 --- a/packages/block-editor/src/store/selectors.js +++ b/packages/block-editor/src/store/selectors.js @@ -1595,7 +1595,7 @@ const isBlockVisibleInTheInserter = ( checkedBlocks.add( blockName ); // If parent blocks are not visible, child blocks should be hidden too. - if ( !! blockType.parent?.length ) { + if ( Array.isArray( blockType?.parent ) ) { return blockType.parent.some( ( name ) => ( blockName !== name &&