Skip to content

Commit

Permalink
CS1-122: Fix percentage value handling
Browse files Browse the repository at this point in the history
  • Loading branch information
andersio committed Feb 6, 2024
1 parent f99cacc commit 9559cc9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion Sources/VitalHealthKit/HealthKit/HealthKitReads.swift
Original file line number Diff line number Diff line change
Expand Up @@ -398,7 +398,7 @@ func handleBody(

bodyFatPercentage = bodyFatPercentage.map {
var copy = $0
copy.value = $0.value * 100
copy.value = $0.value
return copy
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ extension QuantitySample {

self.init(
id: value.uuid.uuidString,
value: value.quantity.doubleValue(for: sample.sampleType.toHealthKitUnits),
value: doubleValue,
startDate: sample.startDate,
endDate: sample.endDate,
sourceBundle: value.sourceRevision.source.bundleIdentifier,
Expand Down

0 comments on commit 9559cc9

Please sign in to comment.