Skip to content

Commit b80a290

Browse files
fix trying to draw altitude profile for chase cars
1 parent d894c3f commit b80a290

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

js/tracker.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -746,7 +746,7 @@ function updateVehicleInfo(index, newPosition) {
746746
$('.landscape .vehicle'+index).html(a + l + b);
747747

748748
// redraw canvas
749-
if(!embed.latestonly) {
749+
if(!embed.latestonly && vehicles[index].graph_data.length) {
750750
var c = $('.vehicle'+index+' .graph');
751751
drawAltitudeProfile(c.get(0), c.get(1), vehicles[index].graph_data[0], vehicles[index].max_alt);
752752
}

0 commit comments

Comments
 (0)