Skip to content

Commit

Permalink
Query Loop: Fix condition for displaying 'parents' control (#44630)
Browse files Browse the repository at this point in the history
The logical NOT here is a typo. The Query Loop block should display the filter for hierarchical post types; unless the `allowedControls` list omits the control filter.
  • Loading branch information
Mamaduka authored and ockham committed Oct 4, 2022
1 parent 0e6dda0 commit 81a1a61
Showing 1 changed file with 1 addition and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -241,10 +241,7 @@ export default function QueryInspectorControls( {
</ToolsPanelItem>
) }
{ isPostTypeHierarchical &&
! isControlAllowed(
allowedControls,
'parents'
) && (
isControlAllowed( allowedControls, 'parents' ) && (
<ToolsPanelItem
hasValue={ () => !! parents?.length }
label={ __( 'Parents' ) }
Expand Down

0 comments on commit 81a1a61

Please sign in to comment.