diff options
Diffstat (limited to 'modern/src/map/GeofenceMap.js')
-rw-r--r-- | modern/src/map/GeofenceMap.js | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/modern/src/map/GeofenceMap.js b/modern/src/map/GeofenceMap.js index c0ecef40..0d27df82 100644 --- a/modern/src/map/GeofenceMap.js +++ b/modern/src/map/GeofenceMap.js @@ -7,7 +7,7 @@ import { geofenceToFeature } from './mapUtil'; const GeofenceMap = () => { const id = 'geofences'; - const geofences = useSelector((state) => Object.values(state.geofences.items)); + const geofences = useSelector((state) => state.geofences.items); useEffect(() => { map.addSource(id, { @@ -74,7 +74,7 @@ const GeofenceMap = () => { useEffect(() => { map.getSource(id).setData({ type: 'FeatureCollection', - features: geofences.map(geofenceToFeature), + features: Object.values(geofences).map(geofenceToFeature), }); }, [geofences]); |