From 880b9b36c6be6fc5d8d33546e97aa5a562836c69 Mon Sep 17 00:00:00 2001 From: ntsekouras Date: Wed, 12 Jan 2022 14:21:56 +0200 Subject: [PATCH] remove top level block check --- packages/block-library/src/query/edit/index.js | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/packages/block-library/src/query/edit/index.js b/packages/block-library/src/query/edit/index.js index a75159fcdc4458..80c160ca83bb00 100644 --- a/packages/block-library/src/query/edit/index.js +++ b/packages/block-library/src/query/edit/index.js @@ -30,13 +30,8 @@ import { getFirstQueryClientIdFromBlocks } from '../utils'; const TEMPLATE = [ [ 'core/post-template' ] ]; function ResetQueryLoopMenuItem( { clientId, isSelected } ) { - const rootClientId = useSelect( - ( select ) => - select( blockEditorStore ).getBlockRootClientId( clientId ), - [ clientId ] - ); const { replaceInnerBlocks } = useDispatch( blockEditorStore ); - if ( ! isSelected || rootClientId ) { + if ( ! isSelected ) { return null; } return (