Jonas Björkert 1 год назад
Родитель
Сommit
32a1923f66
1 измененных файлов с 1 добавлено и 0 удалено
  1. 1 0
      LoopFollow/Helpers/TextFieldWithToolBar.swift

+ 1 - 0
LoopFollow/Helpers/TextFieldWithToolBar.swift

@@ -185,6 +185,7 @@ public struct TextFieldWithToolBar: UIViewRepresentable {
                             message += "Maximum: \(self.format(quantity: maxValue, for: self.unit))"
                         }
                         self.onValidationError(message)
+                        self.parent.quantity = HKQuantity(unit: self.unit, doubleValue: 0)
                     }
                 } else {
                     self.onValidationError("Invalid number format")