Skip to content

Commit 925faae

Browse files
fix graph not being updated with prediction
the fix in fd8d2dd didn't work as the prediction loads before the vehicles are loaded in. So, we initiate the prediction fetch after we've loaded all the vehicles.
1 parent 158c555 commit 925faae

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
@@ -2268,8 +2268,6 @@ function refresh() {
22682268
complete: function(request, textStatus) {
22692269
clearTimeout(periodical);
22702270
periodical = setTimeout(refresh, timer_seconds * 1000);
2271-
2272-
if(periodical_predictions === null) refreshPredictions();
22732271
}
22742272
});
22752273
}
@@ -2737,6 +2735,8 @@ function update(response) {
27372735
zoom_on_payload();
27382736
}
27392737

2738+
if(periodical_predictions === null) refreshPredictions();
2739+
27402740
ajax_inprogress = false;
27412741
}
27422742
};

0 commit comments

Comments
 (0)