aboutsummaryrefslogtreecommitdiff
path: root/modern/src/store
diff options
context:
space:
mode:
authorAnton Tananaev <anton@traccar.org>2022-10-28 17:53:24 -0700
committerAnton Tananaev <anton@traccar.org>2022-10-28 17:53:24 -0700
commit06c98c0b8216bbba5bf971cb92138741df03f1c4 (patch)
tree431c7e29649ed3824a26c01615904fa9cce81375 /modern/src/store
parent080164d310c9f789b400e9909c12423bf31ef79c (diff)
downloadtrackermap-web-06c98c0b8216bbba5bf971cb92138741df03f1c4.tar.gz
trackermap-web-06c98c0b8216bbba5bf971cb92138741df03f1c4.tar.bz2
trackermap-web-06c98c0b8216bbba5bf971cb92138741df03f1c4.zip
Improve live routes (fix #1017)
Diffstat (limited to 'modern/src/store')
-rw-r--r--modern/src/store/session.js2
1 files changed, 2 insertions, 0 deletions
diff --git a/modern/src/store/session.js b/modern/src/store/session.js
index 121b47f5..1d8b2a22 100644
--- a/modern/src/store/session.js
+++ b/modern/src/store/session.js
@@ -30,6 +30,8 @@ const { reducer, actions } = createSlice({
if (!last || (last[0] !== position.longitude && last[1] !== position.latitude)) {
state.history[position.deviceId] = [...route.slice(1 - liveRoutesLimit), [position.longitude, position.latitude]];
}
+ } else {
+ state.history = {};
}
});
},