Skip to content

Commit c8f97d6

Browse files
committed
removeHKMVC crashes force unwrapping goal.humanizedAutodata
1 parent f624c9d commit c8f97d6

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

BeeSwift/Settings/RemoveHKMetricViewController.swift

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,7 +44,7 @@ class RemoveHKMetricViewController: UIViewController {
4444
attrString.append(NSMutableAttributedString(string: "\(self.goal.slug)\n",
4545
attributes: [NSAttributedString.Key.font: UIFont.beeminder.defaultBoldFont]))
4646

47-
attrString.append(NSMutableAttributedString(string: "This goal obtains its data from Apple Health (\(self.goal.humanizedAutodata!)). You can disconnect the goal with the button below.",
47+
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.",
4848
attributes: [NSAttributedString.Key.font: UIFont.beeminder.defaultFontLight.withSize(Constants.defaultFontSize)]))
4949
return attrString
5050
}()

0 commit comments

Comments
 (0)