Skip to content

Commit

Permalink
Remove duplicate post tag filter logic
Browse files Browse the repository at this point in the history
  • Loading branch information
jsnmoon committed Sep 25, 2019
1 parent a8e3949 commit d6917f7
Showing 1 changed file with 0 additions and 5 deletions.
5 changes: 0 additions & 5 deletions modules/search/instant-search/lib/api.js
Original file line number Diff line number Diff line change
Expand Up @@ -78,11 +78,6 @@ function buildFilterObject( filterQuery ) {
filter.bool.must.push( { term: { 'tag.slug': tag } } );
} );
}
if ( isLengthyArray( filterQuery.post_tag ) ) {
filterQuery.post_tag.forEach( tag => {
filter.bool.must.push( { term: { 'tag.slug': tag } } );
} );
}
if ( isLengthyArray( filterQuery.month_post_date ) ) {
const { startDate, endDate } = generateDateRange( filterQuery.month_post_date, 'month' );
filter.bool.must.push( { range: { date: { gte: startDate, lt: endDate } } } );
Expand Down

0 comments on commit d6917f7

Please sign in to comment.