Skip to content

Commit ef6863a

Browse files
bug fix in prediction redraw routines
1 parent c3cc1c1 commit ef6863a

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

js/mobile.js

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

js/tracker.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -417,7 +417,7 @@ function redrawPrediction(vehicle_index) {
417417
}
418418
}
419419

420-
if(vehicle.prediction_polyline) {
420+
if(typeof vehicle.prediction_polyline !== 'undefined') {
421421
vehicle.prediction_polyline.setPath(line);
422422
} else {
423423
vehicle.prediction_polyline = new google.maps.Polyline({
@@ -444,7 +444,7 @@ function redrawPrediction(vehicle_index) {
444444
+ '</p>';
445445
*/
446446
var html = "";
447-
if(vehicle.prediction_target) {
447+
if(typeof vehicle.prediction_target !== 'undefined') {
448448
vehicle.prediction_target.setPosition(latlng);
449449
} else {
450450
vehicle.prediction_target = addMarker(image_src, latlng);
@@ -465,7 +465,7 @@ function redrawPrediction(vehicle_index) {
465465
+ data[burst_index].lat + ', ' + data[burst_index].lon + ', ' + Math.round(data[burst_index].alt) + ' m at ' + time_string
466466
+ '</p>';
467467
*/
468-
if(vehicle.prediction_target) {
468+
if(typeof vehicle.prediction_burst !== 'undefined') {
469469
vehicle.prediction_burst.setPosition(latlng);
470470
} else {
471471
vehicle.prediction_burst = addMarker(image_src, latlng);

0 commit comments

Comments
 (0)