Skip to content

Commit

Permalink
removeHKMVC crashes force unwrapping goal.humanizedAutodata
Browse files Browse the repository at this point in the history
  • Loading branch information
krugerk committed Dec 18, 2024
1 parent 63decd7 commit d3de888
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion BeeSwift/Settings/RemoveHKMetricViewController.swift
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ class RemoveHKMetricViewController: UIViewController {
attrString.append(NSMutableAttributedString(string: "\(self.goal.slug)\n",
attributes: [NSAttributedString.Key.font: UIFont.beeminder.defaultBoldFont]))

attrString.append(NSMutableAttributedString(string: "This goal obtains its data from Apple Health (\(self.goal.humanizedAutodata!)). You can disconnect the goal with the button below.",
attrString.append(NSMutableAttributedString(string: "This goal obtains its data from Apple Health (\(self.goal.humanizedAutodata ?? self.goal.healthKitMetric ?? "unknown metric")). You can disconnect the goal with the button below.",
attributes: [NSAttributedString.Key.font: UIFont.beeminder.defaultFontLight.withSize(Constants.defaultFontSize)]))
return attrString
}()
Expand Down

0 comments on commit d3de888

Please sign in to comment.