Skip to content

Commit

Permalink
gix logical condition
Browse files Browse the repository at this point in the history
  • Loading branch information
jorgefilipecosta committed Jul 3, 2024
1 parent 0eeeab4 commit 1679f31
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ const PAGE_CONTENT_BLOCKS = [

const TEMPLATE_PART_BLOCK = 'core/template-part';

export default function TemplateContentPanel( renderingMode ) {
export default function TemplateContentPanel( { renderingMode } ) {
const { enableComplementaryArea } = useDispatch( interfaceStore );
const { clientIds, postType } = useSelect( ( select ) => {
const { getBlocksByName } = select( blockEditorStore );
Expand All @@ -42,7 +42,8 @@ export default function TemplateContentPanel( renderingMode ) {
),
};
}, [] );
if ( renderingMode !== 'post-only' && postType !== TEMPLATE_POST_TYPE ) {

if ( renderingMode === 'post-only' && postType !== TEMPLATE_POST_TYPE ) {
return null;
}

Expand Down

0 comments on commit 1679f31

Please sign in to comment.