Browse Source

fix: double lastGlucose convertion

Bastiaan Verhaar 4 months ago
parent
commit
ceafe12575
1 changed files with 1 additions and 1 deletions
  1. 1 1
      Trio/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

+ 1 - 1
Trio/Sources/Modules/Home/View/Header/CurrentGlucoseView.swift

@@ -141,7 +141,7 @@ struct CurrentGlucoseView: View {
         var secondLastGlucose = Decimal(glucose.first?.glucose ?? 0)
         if units == .mmolL {
             lastGlucose = lastGlucose.asMmolL
-            secondLastGlucose = lastGlucose.asMmolL
+            secondLastGlucose = secondLastGlucose.asMmolL
         }
         let delta = lastGlucose - secondLastGlucose
         return deltaFormatter.string(from: delta as NSNumber) ?? "--"