fleetmap-reports 1.0.484 → 1.0.485

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.484",
3
+ "version": "1.0.485",
4
4
  "description": "",
5
5
  "main": "src/index.js",
6
6
  "scripts": {
@@ -218,7 +218,7 @@ async function findEventsPosition (from, to, devices, events, routes, userData)
218
218
  for (const d of devices) {
219
219
  const deviceEvents = events.filter(e => e.deviceId === d.id && e.positionId)
220
220
  if (deviceEvents.length > 0) {
221
- deviceEvents.sort((a, b) => a.positionId - b.positionId)
221
+ deviceEvents.sort((a, b) => new Date(a.position.fixTime) - new Date(b.position.fixTime))
222
222
  const positions = routes.filter(p => p.deviceId === d.id)
223
223
 
224
224
  for (const a of deviceEvents) {