diff --git a/packages/frontend-core/src/components/FilterBuilder.svelte b/packages/frontend-core/src/components/FilterBuilder.svelte index 0972bd278c..14bbc47e86 100644 --- a/packages/frontend-core/src/components/FilterBuilder.svelte +++ b/packages/frontend-core/src/components/FilterBuilder.svelte @@ -170,12 +170,8 @@ } function handleOnEmptyFilter(value) { - const existingFilter = filters?.find(filter => filter.onEmptyFilter) - if (existingFilter) { - existingFilter.onEmptyFilter = value - } else { - filters.push({ onEmptyFilter: value }) - } + filters = filters?.filter(filter => !filter.onEmptyFilter) + filters.push({ onEmptyFilter: value }) }