mirror of
https://github.com/PostHog/posthog.git
synced 2024-11-24 00:47:50 +01:00
fix(flags): prevent error when CohortCriteriaGroupFilter has undefined values (#26263)
This commit is contained in:
parent
a41bd2d4f9
commit
5e8d1cbb55
@ -10,7 +10,7 @@ function isCohortCriteriaGroupFilter(
|
|||||||
|
|
||||||
const hasBehavioralFilter = (cohort: CohortType, allCohorts: CohortType[]): boolean => {
|
const hasBehavioralFilter = (cohort: CohortType, allCohorts: CohortType[]): boolean => {
|
||||||
const checkCriteriaGroup = (group: CohortCriteriaGroupFilter): boolean => {
|
const checkCriteriaGroup = (group: CohortCriteriaGroupFilter): boolean => {
|
||||||
return group.values.some((value) => {
|
return group.values?.some((value) => {
|
||||||
if (isCohortCriteriaGroupFilter(value)) {
|
if (isCohortCriteriaGroupFilter(value)) {
|
||||||
return checkCriteriaGroup(value)
|
return checkCriteriaGroup(value)
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user