Skip to content

Commit

Permalink
set initial value as double
Browse files Browse the repository at this point in the history
  • Loading branch information
cbaker6 committed Jul 6, 2024
1 parent 5bfe2a6 commit 1a2e7d6
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions Sources/CareKitEssentials/Cards/Shared/CardViewModel.swift
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit 1a2e7d6

Please sign in to comment.