Skip to content

Commit

Permalink
Fix empty filter
Browse files Browse the repository at this point in the history
  • Loading branch information
ksuess committed Feb 4, 2023
1 parent b03a547 commit ec7dd3e
Showing 1 changed file with 5 additions and 1 deletion.
6 changes: 5 additions & 1 deletion src/components/Searchkit/CustomESRequestSerializer.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -384,7 +384,11 @@ export class CustomESRequestSerializer {
// agg is a key of aggFieldsMapping.
// something like 'kompasscomponent_agg.inner.kompasscomponent_token'
return isEmpty(filter)
? { match_all: {} }
? {
bool: {
filter: [],
},
}
: {
bool: {
filter: filter.filter(
Expand Down

0 comments on commit ec7dd3e

Please sign in to comment.