Skip to content

Commit

Permalink
remove top level block check
Browse files Browse the repository at this point in the history
  • Loading branch information
ntsekouras committed Jan 12, 2022
1 parent 41860a2 commit 880b9b3
Showing 1 changed file with 1 addition and 6 deletions.
7 changes: 1 addition & 6 deletions packages/block-library/src/query/edit/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -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 (
Expand Down

0 comments on commit 880b9b3

Please sign in to comment.