Skip to content

Commit

Permalink
fix(properties): avoid adding empty property filters (#22972)
Browse files Browse the repository at this point in the history
  • Loading branch information
thmsobrmlr authored Jun 17, 2024
1 parent 5ab011b commit 1bc6300
Showing 1 changed file with 3 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ import { objectsEqual } from 'lib/utils'
import { eventUsageLogic } from 'lib/utils/eventUsageLogic'

import { StickinessQuery, TrendsQuery } from '~/queries/schema'
import { EmptyPropertyFilter, FilterLogicalOperator, PropertyGroupFilter } from '~/types'
import { FilterLogicalOperator, PropertyGroupFilter } from '~/types'

import type { propertyGroupFilterLogicType } from './propertyGroupFilterLogicType'

Expand Down Expand Up @@ -48,15 +48,12 @@ export const propertyGroupFilterLogic = kea<propertyGroupFilterLogicType>([
values: [
{
type: FilterLogicalOperator.And,
values: [{} as EmptyPropertyFilter],
values: [],
},
],
}
}
const filterGroups = [
...state.values,
{ type: FilterLogicalOperator.And, values: [{} as EmptyPropertyFilter] },
]
const filterGroups = [...state.values, { type: FilterLogicalOperator.And, values: [] }]

return { ...state, values: filterGroups }
},
Expand Down

0 comments on commit 1bc6300

Please sign in to comment.