소스 검색

Dabear's math fix

Ivan Valkou 4 년 전
부모
커밋
f3918d12d9
1개의 변경된 파일5개의 추가작업 그리고 0개의 파일을 삭제
  1. 5 0
      FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

+ 5 - 0
FreeAPS/Sources/Modules/Home/View/Chart/MainChartView.swift

@@ -845,6 +845,11 @@ extension MainChartView {
             minValue = min(minValue, minTargetValue)
         }
 
+        if minValue == maxValue {
+            minValue = Config.minGlucose
+            maxValue = Config.maxGlucose
+        }
+
         return (min: minValue, max: maxValue)
     }