Skip to content

Commit 148af23

Browse files
fix graph bug when first position has no data
When there is no json data, the function will stop before recoding the altitude in the first series. Subquential position would cause an exception.
1 parent 04d6e31 commit 148af23

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

js/tracker.js

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1543,11 +1543,10 @@ function graphAddPosition(vcallsign, new_data) {
15431543

15441544
// we don't record extra data, if there is no telemetry graph loaded
15451545
// altitude is used for altitude profile
1546-
if(plot) {
1546+
if(plot && new_data.data != "") {
15471547

15481548
// the rest of the series is from the data field
15491549
var json = $.parseJSON(new_data.data);
1550-
if(!json) return;
15511550

15521551
// init empty data matrix
15531552
var data_matrix = [];

0 commit comments

Comments
 (0)