fleetmap-reports 1.0.873 → 1.0.875

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.873",
3
+ "version": "1.0.875",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -305,11 +305,12 @@ function getCountry (position) {
305
305
  }
306
306
 
307
307
  async function getRoadSpeedLimits (devices, routes, threshold, minimumMinutes = 0) {
308
- const position = routes[0]
308
+ const position = routes.find(p => getCountry(p))
309
309
  const country = getCountry(position)
310
310
  const config = {
311
311
  CHL: getOSMSpeedingEvents,
312
- MAR: getOSMSpeedingEvents
312
+ MAR: getOSMSpeedingEvents,
313
+ BRA: getOSMSpeedingEvents
313
314
  }
314
315
  const method = config[country] || getHereEvents
315
316
  return method(devices, routes, threshold, minimumMinutes, country && country.code)