From aac3df82223967f0adad0f0818884d20054b1562 Mon Sep 17 00:00:00 2001 From: Hero Date: Fri, 8 Sep 2023 10:28:08 +0200 Subject: [PATCH] OHRI-1833: Null error pop up after child registration on the child MNCH summary ("when there is no relationship") resolved --- .../src/views/mch-summary/tabs/hiv-exposed-infant.component.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/esm-ohri-pmtct-app/src/views/mch-summary/tabs/hiv-exposed-infant.component.tsx b/packages/esm-ohri-pmtct-app/src/views/mch-summary/tabs/hiv-exposed-infant.component.tsx index d8daeb940..6eb388983 100644 --- a/packages/esm-ohri-pmtct-app/src/views/mch-summary/tabs/hiv-exposed-infant.component.tsx +++ b/packages/esm-ohri-pmtct-app/src/views/mch-summary/tabs/hiv-exposed-infant.component.tsx @@ -140,7 +140,7 @@ const HivExposedInfant: React.FC<{ async function getParentRelationships() { let relationships = []; const relationshipsData = await fetchPatientRelationships(patientUuid); - if (relationshipsData.length) { + if (relationshipsData?.length) { relationshipsData.forEach((item) => { relationships.push(item); });