aboutsummaryrefslogtreecommitdiff
path: root/modern
diff options
context:
space:
mode:
authorAnton Tananaev <anton.tananaev@gmail.com>2022-06-30 17:08:03 -0700
committerGitHub <noreply@github.com>2022-06-30 17:08:03 -0700
commitd7a3278718a60826307b3d172b4cd83ef3028c52 (patch)
tree6adff351af9ba511e46c72acb5afcf0d39b7f2c0 /modern
parentd5a1440dd35ee6113cdc98ab80b8c8b935adec81 (diff)
parenta0f2c7152367b7289e51f5fbdda67f0e8d561f50 (diff)
downloadtrackermap-web-d7a3278718a60826307b3d172b4cd83ef3028c52.tar.gz
trackermap-web-d7a3278718a60826307b3d172b4cd83ef3028c52.tar.bz2
trackermap-web-d7a3278718a60826307b3d172b4cd83ef3028c52.zip
Merge pull request #977 from BIhab/fix-live-route-issue
fix: live route blank page issue
Diffstat (limited to 'modern')
-rw-r--r--modern/src/map/main/MapLiveRoutes.js2
1 files changed, 1 insertions, 1 deletions
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]);
}