Fix jwt-token
This commit is contained in:
@@ -411,7 +411,8 @@ const MapView = () => {
|
|||||||
|
|
||||||
return Object.entries(detectionsByDetector).flatMap(([deviceId, detections]) => {
|
return Object.entries(detectionsByDetector).flatMap(([deviceId, detections]) => {
|
||||||
// Find the detector device for these 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) {
|
if (!detectorDevice || !detectorDevice.geo_lat || !detectorDevice.geo_lon) {
|
||||||
console.warn('MapView: No device found or missing coordinates for device_id:', deviceId);
|
console.warn('MapView: No device found or missing coordinates for device_id:', deviceId);
|
||||||
return [];
|
return [];
|
||||||
|
|||||||
Reference in New Issue
Block a user