mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 00:47:50 +01:00
add null check on eventUsageLogic (#3125)
This commit is contained in:
parent
34dbbec647
commit
ff3d2d7aae
@ -5,6 +5,7 @@ import posthog from 'posthog-js'
|
||||
import { userLogic } from 'scenes/userLogic'
|
||||
import { eventUsageLogicType } from './eventUsageLogicType'
|
||||
import { AnnotationType, FilterType, DashboardType } from '~/types'
|
||||
import { ViewType } from 'scenes/insights/insightLogic'
|
||||
|
||||
const keyMappingKeys = Object.keys(keyMapping.event)
|
||||
|
||||
@ -143,7 +144,7 @@ export const eventUsageLogic = kea<eventUsageLogicType>({
|
||||
}
|
||||
|
||||
for (const item of dashboard.items) {
|
||||
const key = `${item.filters.insight.toLowerCase()}_count`
|
||||
const key = `${item.filters?.insight?.toLowerCase() || ViewType.TRENDS}_count`
|
||||
if (!properties[key]) {
|
||||
properties[key] = 1
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user