From b6fd6bede344b40b7dcddc90ad24b505871f060c Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Thu, 28 Aug 2025 13:35:11 +0200 Subject: [PATCH] Fix jwt-token --- client/src/components/AlertModals.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/components/AlertModals.jsx b/client/src/components/AlertModals.jsx index cf7fe15..7f8c090 100644 --- a/client/src/components/AlertModals.jsx +++ b/client/src/components/AlertModals.jsx @@ -26,9 +26,10 @@ export const EditAlertModal = ({ rule, onClose, onSuccess }) => { const fetchDroneTypes = async () => { try { const response = await api.get('/drone-types'); - setDroneTypes(response.data); + setDroneTypes(response.data.data || []); } catch (error) { console.error('Error fetching drone types:', error); + setDroneTypes([]); } };