Skip to content

Commit 57ea969

Browse files
committed
fix edge case
1 parent dfe69bd commit 57ea969

File tree

1 file changed

+18
-7
lines changed

1 file changed

+18
-7
lines changed

js/tracker.js

Lines changed: 18 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2591,11 +2591,15 @@ function refresh() {
25912591
return;
25922592
}
25932593

2594+
console.log(vehicles);
2595+
25942596
if (ajax_inprogress_old == wvar.query) {
2595-
return;
2596-
} else {
2597-
document.getElementById("timeperiod").disabled = false;
2597+
if (vehicles.hasOwnProperty(wvar.query)) {
2598+
return;
2599+
}
25982600
}
2601+
2602+
document.getElementById("timeperiod").disabled = false;
25992603

26002604
ajax_inprogress = true;
26012605

@@ -2670,8 +2674,11 @@ function refreshSingle(serial, first) {
26702674
}
26712675
return;
26722676
}
2673-
if (serial == ajax_inprogress_old) {
2674-
return;
2677+
2678+
if (ajax_inprogress_old == wvar.query) {
2679+
if (vehicles.hasOwnProperty(wvar.query)) {
2680+
return;
2681+
}
26752682
}
26762683

26772684
if (first === undefined) {
@@ -2709,8 +2716,12 @@ function refreshSingle(serial, first) {
27092716

27102717
function refreshSingleOld(serial) {
27112718

2712-
if(serial == ajax_inprogress_old) {
2713-
return;
2719+
console.log(vehicles);
2720+
2721+
if (ajax_inprogress_old == wvar.query) {
2722+
if (vehicles.hasOwnProperty(wvar.query)) {
2723+
return;
2724+
}
27142725
}
27152726

27162727
document.getElementById("timeperiod").disabled = true;

0 commit comments

Comments
 (0)