From 5e8d1cbb5591150275044a7976646bd8fc0f3ca6 Mon Sep 17 00:00:00 2001 From: Haven Date: Mon, 18 Nov 2024 17:18:35 -0800 Subject: [PATCH] fix(flags): prevent error when CohortCriteriaGroupFilter has undefined values (#26263) --- .../src/lib/components/TaxonomicFilter/cohortFilterUtils.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/frontend/src/lib/components/TaxonomicFilter/cohortFilterUtils.ts b/frontend/src/lib/components/TaxonomicFilter/cohortFilterUtils.ts index 89ba438fd2f..0ecf87bdc05 100644 --- a/frontend/src/lib/components/TaxonomicFilter/cohortFilterUtils.ts +++ b/frontend/src/lib/components/TaxonomicFilter/cohortFilterUtils.ts @@ -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) }