From 580727e02e50cf8b5ad0bee93ff0d4fe1c2dc5e2 Mon Sep 17 00:00:00 2001 From: Donald Kibet Date: Wed, 5 Jun 2024 13:32:21 +0300 Subject: [PATCH] (fix) fix error on adding extra visit attributes --- .../src/visit/visit-form/visit-form.component.tsx | 3 +++ 1 file changed, 3 insertions(+) diff --git a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx index 883ddb7228..0e9c1fabdb 100644 --- a/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx +++ b/packages/esm-patient-chart-app/src/visit/visit-form/visit-form.component.tsx @@ -440,6 +440,9 @@ const StartVisitForm: React.FC = ({ if (config.showExtraVisitAttributesSlot) { const { handleCreateExtraVisitInfo, attributes } = extraVisitInfo ?? {}; + if (!payload.attributes) { + payload.attributes = []; + } payload.attributes.push(...attributes); handleCreateExtraVisitInfo && handleCreateExtraVisitInfo(); }