diff --git a/Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift b/Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift index caebaa2e..5c0520b2 100644 --- a/Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift +++ b/Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift @@ -82,6 +82,9 @@ open class CardViewModel: ObservableObject { action: ((OCKOutcomeValue?) async throws -> OCKAnyOutcome)? = nil ) { self.initialValue = initialValue + if let initialValueAsDouble = initialValue.doubleValue { + self.valueAsDouble = initialValueAsDouble + } self.value = event.outcomeFirstValue ?? initialValue self.detailsTitle = detailsTitle self.detailsInformation = detailsInformation