Skip to content

Commit

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

0 comments on commit b85bcfe

Please sign in to comment.