From 4568e8574dd742617d139bc146fc0da4287dcedf Mon Sep 17 00:00:00 2001 From: JOSHIK Date: Mon, 23 Sep 2024 19:10:21 +0100 Subject: [PATCH] fixed something went wrong error by setting prefetch to trigger only when cons id is present --- src/Components/Facility/DischargeModal.tsx | 1 + 1 file changed, 1 insertion(+) diff --git a/src/Components/Facility/DischargeModal.tsx b/src/Components/Facility/DischargeModal.tsx index 4e27f52cc0a..9c3b69a6ac9 100644 --- a/src/Components/Facility/DischargeModal.tsx +++ b/src/Components/Facility/DischargeModal.tsx @@ -127,6 +127,7 @@ const DischargeModal = ({ const initialDiagnoses = useQuery(routes.getConsultation, { pathParams: { id: consultationData.id ?? "" }, + prefetch: !!consultationData.id, }).data?.diagnoses; const discharge_reason =