Resolve "CMB - rider realtime not displaying" #1387

Closed
jankstudio wants to merge 86 commits from 489-cmb-rider-realtime-not-displaying into master
Showing only changes of commit b6d2726d41 - Show all commits

View file

@ -335,16 +335,18 @@ class DashboardMap {
if (this.rider_names.hasOwnProperty(id)) { if (this.rider_names.hasOwnProperty(id)) {
name = this.rider_names[id]; name = this.rider_names[id];
callback(name); callback(name);
} } else {
// ajax call to get it // ajax call to get it
$.ajax({ $.ajax({
method: "GET", method: "GET",
url: rider_url url: rider_url
}).done(function(response) { }).done(function(response) {
name = response.rider_name; name = response.rider_name;
// set name in cache
my.rider_names[id] = name; my.rider_names[id] = name;
callback(name); callback(name);
}); });
} }
}
} }