Skip to content

Commit ed3a410

Browse files
fix showing predictions for 'landed' vehicles
1 parent ec6b0cc commit ed3a410

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

js/tracker.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -2034,17 +2034,18 @@ function updatePredictions(r) {
20342034

20352035
var i = 0, ii = r.length;
20362036
for(; i < ii; i++) {
2037-
if(r[i].vehicle == "XX") continue;
2038-
if(r[i].vehicle in hysplit && r[i].vehicle in vehicles) {
2039-
removePrediction(vcallsign);
2040-
continue;
2041-
}
2042-
20432037
var vcallsign = r[i].vehicle;
20442038

2039+
if(vcallsign == "XX") continue;
2040+
20452041
if(vehicles.hasOwnProperty(vcallsign)) {
20462042
var vehicle = vehicles[vcallsign];
20472043

2044+
if(vcallsign in hysplit || vehicle.marker.mode == "landed") {
2045+
removePrediction(vcallsign);
2046+
continue;
2047+
}
2048+
20482049
if(vehicle.prediction && vehicle.prediction.time == r[i].time) {
20492050
continue;
20502051
}

0 commit comments

Comments
 (0)