From 0a7f1d44eef725e59b4ba2abab136b948cdba1f8 Mon Sep 17 00:00:00 2001 From: Prateek Keerthi Date: Fri, 17 Nov 2023 09:33:38 -0500 Subject: [PATCH] MAT-6194 added extra checks --- src/util/GroupCoverageHelpers.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/util/GroupCoverageHelpers.ts b/src/util/GroupCoverageHelpers.ts index 33faa8135..09ffd9dab 100644 --- a/src/util/GroupCoverageHelpers.ts +++ b/src/util/GroupCoverageHelpers.ts @@ -65,10 +65,10 @@ export const mapCql = ( return groupPopulations.reduce((output, { groupId, populationValues }) => { output[groupId] = { - populationDefinitions: populationValues.reduce( + populationDefinitions: populationValues?.reduce( (populationDefinition, { name, criteriaReference }) => { - const matchingDefinition: any = definitions.find( - (def) => _.camelCase(def.name.slice(1, -1)) === name + const matchingDefinition: any = definitions?.find( + (def) => _.camelCase(def?.name?.slice(1, -1)) === name ); populationDefinition[name] = {