From eda13c350505ef284482a40c23f2e757e9e7bcfe Mon Sep 17 00:00:00 2001 From: Alexander Borg Date: Wed, 17 Sep 2025 19:40:37 +0200 Subject: [PATCH] Fix jwt-token --- client/src/pages/MapView.jsx | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/client/src/pages/MapView.jsx b/client/src/pages/MapView.jsx index 09ab61a..329f4b2 100644 --- a/client/src/pages/MapView.jsx +++ b/client/src/pages/MapView.jsx @@ -411,7 +411,8 @@ const MapView = () => { return Object.entries(detectionsByDetector).flatMap(([deviceId, detections]) => { // Find the detector device for these detections - const detectorDevice = devices.find(d => d.id === parseInt(deviceId)); + // Compare as strings since device IDs are stored as strings + const detectorDevice = devices.find(d => d.id === deviceId); if (!detectorDevice || !detectorDevice.geo_lat || !detectorDevice.geo_lon) { console.warn('MapView: No device found or missing coordinates for device_id:', deviceId); return [];