fleetmap-reports 1.0.681 → 1.0.682

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.681",
3
+ "version": "1.0.682",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -43,7 +43,7 @@ async function createActivityReport (from, to, userData, traccarInstance) {
43
43
  const point = convertPositionToFeature({ latitude: s.latitude, longitude: s.longitude })
44
44
  const unauthorized = unauthorizedGeofencesFeatures.find(g => {
45
45
  const geofenceFeature = unauthorizedGeofencesFeatures.find(gF => gF.properties.geofence.id === g.id)
46
- return checkGeofenceIn(point, geofenceFeature)
46
+ return geofenceFeature ? checkGeofenceIn(point, geofenceFeature) : false
47
47
  })
48
48
 
49
49
  if (unauthorized) {
@@ -51,7 +51,7 @@ async function createActivityReport (from, to, userData, traccarInstance) {
51
51
  } else {
52
52
  const authorized = authorizedGeofences.find(g => {
53
53
  const geofenceFeature = authorizedGeofencesFeatures.find(gF => gF.properties.geofence.id === g.id)
54
- return checkGeofenceIn(point, geofenceFeature)
54
+ return geofenceFeature ? checkGeofenceIn(point, geofenceFeature) : false
55
55
  })
56
56
 
57
57
  if (authorized) {