Skip to content

Commit ec6b0cc

Browse files
fix lateonly mode not discarding older positions
1 parent 6096bbd commit ec6b0cc

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

js/tracker.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1445,8 +1445,8 @@ function addPosition(position) {
14451445
// add the new position
14461446
if(wvar.latestonly) {
14471447
vehicle.num_positions= 1;
1448-
vehicle.positions.push(new_latlng);
1449-
vehicle.positions_ts.push(new_ts);
1448+
vehicle.positions[0] = new_latlng;
1449+
vehicle.positions_ts[0] = new_ts;
14501450
} else {
14511451
vehicle.positions.push(new_latlng);
14521452
vehicle.positions_ts.push(new_ts);

0 commit comments

Comments
 (0)