0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-27 16:26:50 +01:00

fix(flags): prevent error when CohortCriteriaGroupFilter has undefined values (#26263)

This commit is contained in:
Haven 2024-11-18 17:18:35 -08:00 committed by GitHub
parent a41bd2d4f9
commit 5e8d1cbb55
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -10,7 +10,7 @@ function isCohortCriteriaGroupFilter(
const hasBehavioralFilter = (cohort: CohortType, allCohorts: CohortType[]): boolean => {
const checkCriteriaGroup = (group: CohortCriteriaGroupFilter): boolean => {
return group.values.some((value) => {
return group.values?.some((value) => {
if (isCohortCriteriaGroupFilter(value)) {
return checkCriteriaGroup(value)
}