Merge pull request #329 from nightscout/adrian/fix-crash-no-bg
Fix crash of charts if no bg data exists in mg/dl
This commit is contained in:
commit
7d80176c75
1 changed files with 1 additions and 1 deletions
|
@ -66,7 +66,7 @@ class GraphData(
|
||||||
bgReadingsArray = iobCobCalculatorPlugin.bgReadings
|
bgReadingsArray = iobCobCalculatorPlugin.bgReadings
|
||||||
if (bgReadingsArray?.isEmpty() != false) {
|
if (bgReadingsArray?.isEmpty() != false) {
|
||||||
aapsLogger.debug("No BG data.")
|
aapsLogger.debug("No BG data.")
|
||||||
maxY = 10.0
|
maxY = if (units == Constants.MGDL) 180.0 else 10.0
|
||||||
minY = 0.0
|
minY = 0.0
|
||||||
return
|
return
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in a new issue