From 01f971c4052a0550966b0fe96805afb777ade461 Mon Sep 17 00:00:00 2001 From: Aaron Parecki Date: Thu, 23 Sep 2021 14:46:16 +0000 Subject: [PATCH] fix for no battery data --- compass/public/assets/battery.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/compass/public/assets/battery.js b/compass/public/assets/battery.js index 2ffd2f0..03437e5 100644 --- a/compass/public/assets/battery.js +++ b/compass/public/assets/battery.js @@ -95,7 +95,7 @@ function showBatteryGraph(response) { data: data.properties.map(function(d,i){ return { x: new Date(d.unixtime*1000), // i, - y: ('battery_level' in d ? Math.round(d.battery_level * 100) : null), + y: ('battery_level' in d ? Math.round(d.battery_level * 100) : 0), state: d.battery_state, location: data.coordinates[i] }