Skip to content

Commit

Permalink
Fix template & parts custom filtering
Browse files Browse the repository at this point in the history
  • Loading branch information
oandregal committed Mar 7, 2024
1 parent d839fed commit 74446e7
Showing 1 changed file with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -379,15 +379,15 @@ export default function PageTemplatesTemplateParts( { postType } ) {
if (
filter.field === 'author' &&
filter.operator === OPERATOR_IN &&
!! filter.value
filter?.value?.length > 0
) {
filteredData = filteredData.filter( ( item ) => {
return filter.value.includes( item.author_text );
} );
} else if (
filter.field === 'author' &&
filter.operator === OPERATOR_NOT_IN &&
!! filter.value
filter?.value?.length > 0
) {
filteredData = filteredData.filter( ( item ) => {
return ! filter.value.includes( item.author_text );
Expand Down

0 comments on commit 74446e7

Please sign in to comment.