aboutsummaryrefslogtreecommitdiff
path: root/modern/src
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-09-13 07:11:45 -0700
committerAnton Tananaev <anton@traccar.org>2022-09-13 07:11:45 -0700
commit7935dc0cec214d6e1cc9c2d0624afb547a222086 (patch)
treeb862316325f872d9402cdad16d0cda05fa886365 /modern/src
parent53567243ea2bdda876c9dfa9d1a8ac8e64e5feaa (diff)
downloadtrackermap-web-7935dc0cec214d6e1cc9c2d0624afb547a222086.tar.gz
trackermap-web-7935dc0cec214d6e1cc9c2d0624afb547a222086.tar.bz2
trackermap-web-7935dc0cec214d6e1cc9c2d0624afb547a222086.zip
Handle missing geofences
Diffstat (limited to 'modern/src')
-rw-r--r--modern/src/main/DevicesList.js5
1 files changed, 4 insertions, 1 deletions
diff --git a/modern/src/main/DevicesList.js b/modern/src/main/DevicesList.js
index cea5b253..054cf509 100644
--- a/modern/src/main/DevicesList.js
+++ b/modern/src/main/DevicesList.js
@@ -82,7 +82,10 @@ const DeviceRow = ({ data, index, style }) => {
const formatProperty = (key) => {
if (key === 'geofenceIds') {
const geofenceIds = item[key] || [];
- return geofenceIds.map((id) => geofences[id].name).join(', ');
+ return geofenceIds
+ .filter((id) => geofences.hasOwnProperty(id))
+ .map((id) => geofences[id].name)
+ .join(', ');
}
return item[key];
};