From a0f2c7152367b7289e51f5fbdda67f0e8d561f50 Mon Sep 17 00:00:00 2001 From: Boubrid Ihab Date: Thu, 30 Jun 2022 23:47:23 +0100 Subject: fix: live route blank page issue --- modern/src/map/main/MapLiveRoutes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern') diff --git a/modern/src/map/main/MapLiveRoutes.js b/modern/src/map/main/MapLiveRoutes.js index a675afa0..fc1a1dde 100644 --- a/modern/src/map/main/MapLiveRoutes.js +++ b/modern/src/map/main/MapLiveRoutes.js @@ -60,7 +60,7 @@ const MapLiveRoutes = () => { setRoute([position]); } } else if (position) { - const last = route.findLast(() => true); + const last = route.at(-1); if (!last || (last.latitude !== position.latitude && last.longitude !== position.longitude)) { setRoute([...route.slice(-9), position]); } -- cgit v1.2.3