From 32cb5f8d90df09fd45a54c96491bc3568f14690b Mon Sep 17 00:00:00 2001 From: Anton Tananaev Date: Fri, 27 May 2022 07:08:05 -0700 Subject: Fix browser support --- modern/src/map/main/MapLiveRoutes.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'modern/src/map') diff --git a/modern/src/map/main/MapLiveRoutes.js b/modern/src/map/main/MapLiveRoutes.js index 6e79d7af..139f7d65 100644 --- a/modern/src/map/main/MapLiveRoutes.js +++ b/modern/src/map/main/MapLiveRoutes.js @@ -57,7 +57,7 @@ const MapLiveRoutes = () => { setRoute([position]); } } else if (position) { - const last = route.at(-1); + const last = route.findLast(() => true); if (!last || (last.latitude !== position.latitude && last.longitude !== position.longitude)) { setRoute([...route.slice(-9), position]); } -- cgit v1.2.3