fix: Prevent crash for nil values

This commit is contained in:
Andrea Busi
2021-03-27 15:08:50 +01:00
parent 783a1a5cb4
commit fa69edaa26
2 changed files with 15 additions and 11 deletions
@@ -28,7 +28,11 @@ class SegnalazioniLast24HoursCell: EQNBaseTableViewCell {
// MARK: - Public
@objc func updateUI(for smartphoneNetwork: EQNReteSmartphone) {
@objc func updateUI(for smartphoneNetwork: EQNReteSmartphone?) {
guard let smartphoneNetwork = smartphoneNetwork else {
return
}
self.mildReportsLabel.text = "\(smartphoneNetwork.manualGreen)"
self.strongReportsLabel.text = "\(smartphoneNetwork.manualYellow)"
self.veryStrongReportsLabel.text = "\(smartphoneNetwork.manualRed)"