Skip to content

Commit 10f7147

Browse files
authored
Merge pull request #249 from LoopKit/after-bolus-crash
fix for after-bolus crash
2 parents b2cbeae + 531e7db commit 10f7147

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

Loop/View Controllers/StatusTableViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -147,7 +147,6 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize
147147
charts.startDate = Calendar.current.nextDate(after: date, matching: components, matchingPolicy: .strict, direction: .backward) ?? date
148148

149149
let reloadGroup = DispatchGroup()
150-
let oldRecommendedTempBasal = self.recommendedTempBasal
151150
var newRecommendedTempBasal: LoopDataManager.TempBasalRecommendation?
152151

153152
if let glucoseStore = dataManager.glucoseStore {
@@ -274,6 +273,7 @@ final class StatusTableViewController: UITableViewController, UIGestureRecognize
274273
self.charts.prerender()
275274

276275
// Show/hide the recommended temp basal row
276+
let oldRecommendedTempBasal = self.recommendedTempBasal
277277
self.recommendedTempBasal = newRecommendedTempBasal
278278
switch (oldRecommendedTempBasal, newRecommendedTempBasal) {
279279
case (let old?, let new?) where old != new:

0 commit comments

Comments
 (0)