From 1bc630016f397e7c91f206afced913eca40b0fdd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Thomas=20Oberm=C3=BCller?= Date: Mon, 17 Jun 2024 08:57:54 +0200 Subject: [PATCH] fix(properties): avoid adding empty property filters (#22972) --- .../PropertyGroupFilters/propertyGroupFilterLogic.ts | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) diff --git a/frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/propertyGroupFilterLogic.ts b/frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/propertyGroupFilterLogic.ts index 3b20beb8139a7..cefcde92d1f58 100644 --- a/frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/propertyGroupFilterLogic.ts +++ b/frontend/src/queries/nodes/InsightViz/PropertyGroupFilters/propertyGroupFilterLogic.ts @@ -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' @@ -48,15 +48,12 @@ export const propertyGroupFilterLogic = kea([ 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 } },