Skip to content

Commit bde902e

Browse files
author
Bharat Mediratta
committed
Reverse two logical checks for clarity.
1 parent 5838f6d commit bde902e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Loop Status Extension/StatusExtensionContext.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -117,8 +117,8 @@ final class StatusExtensionContext: NSObject, RawRepresentable {
117117

118118
raw["preferredUnitString"] = preferredUnitString
119119

120-
if let glucose = latestGlucose,
121-
preferredUnitString != nil {
120+
if preferredUnitString != nil,
121+
let glucose = latestGlucose {
122122
raw["latestGlucose_value"] = glucose.quantity
123123
raw["latestGlucose_startDate"] = glucose.startDate
124124
}

0 commit comments

Comments
 (0)