From 123b2ce9674dc2e051118dbd900cd8c88c0ba213 Mon Sep 17 00:00:00 2001 From: Lebewesen Date: Mon, 22 May 2017 23:31:01 +0200 Subject: [PATCH] Fix: ignore null altitudes (#19) --- js/main.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/js/main.js b/js/main.js index c899b9e..648e3a4 100755 --- a/js/main.js +++ b/js/main.js @@ -46,7 +46,9 @@ function displayChart() { data.addColumn('number', 'altitude'); var altLen = altitudes.length; for (var i = 0; i < altLen; i++) { - data.addRow([(i + 1), Math.round((altitudes[i] * factor_m))]); + if (altitudes[i]!=null){ + data.addRow([(i + 1), Math.round((altitudes[i] * factor_m))]); + } } var options = {