@@ -221,18 +224,19 @@ export default function PrescriptionAdministrationsTable({
refetch={refetch}
/>
))}
- {state?.prescriptions.length === 0 && (
-
-
-
- {prn
- ? "No PRN Prescriptions Prescribed"
- : "No Prescriptions Prescribed"}
-
-
- )}
+
+ {state?.prescriptions.length === 0 && (
+
+
+
+ {prn
+ ? "No PRN Prescriptions Prescribed"
+ : "No Prescriptions Prescribed"}
+
+
+ )}
);
@@ -547,7 +551,7 @@ function getAdministrationBounds(prescriptions: Prescription[]) {
curr.last_administered_on && curr.last_administered_on > latest
? curr.last_administered_on
: latest,
- prescriptions[0].created_date ?? new Date()
+ prescriptions[0]?.created_date ?? new Date()
)
);