fleetmap-reports 1.0.692 → 1.0.693

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "fleetmap-reports",
3
- "version": "1.0.692",
3
+ "version": "1.0.693",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -306,10 +306,11 @@ function checkGeofenceExit (p1, p2, g) {
306
306
 
307
307
  function getInAndOutEvents (devices, route, userData) {
308
308
  const events = []
309
+ const geofencesFeatures = userData.geofences.map(g => convertToFeature(g))
310
+
309
311
  devices.forEach(d => {
310
312
  const deviceRoute = route.filter(p => p.deviceId === d.id)
311
313
  const routePoints = deviceRoute.sort(sortPositions).map(p => convertPositionToFeature(p))
312
- const geofencesFeatures = userData.geofences.map(g => convertToFeature(g))
313
314
  const deviceEvents = []
314
315
  routePoints.filter(p => p.properties.position.valid).forEach((p, i, array) => {
315
316
  if (!i) {