diff options
author | Anton Tananaev <anton@traccar.org> | 2022-09-13 07:11:45 -0700 |
---|---|---|
committer | Anton Tananaev <anton@traccar.org> | 2022-09-13 07:11:45 -0700 |
commit | 7935dc0cec214d6e1cc9c2d0624afb547a222086 (patch) | |
tree | b862316325f872d9402cdad16d0cda05fa886365 /modern | |
parent | 53567243ea2bdda876c9dfa9d1a8ac8e64e5feaa (diff) | |
download | trackermap-web-7935dc0cec214d6e1cc9c2d0624afb547a222086.tar.gz trackermap-web-7935dc0cec214d6e1cc9c2d0624afb547a222086.tar.bz2 trackermap-web-7935dc0cec214d6e1cc9c2d0624afb547a222086.zip |
Handle missing geofences
Diffstat (limited to 'modern')
-rw-r--r-- | modern/src/main/DevicesList.js | 5 |
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]; }; |