diff --git a/MVMCore/MVMCore/Models/ActionType/AlertModel.swift b/MVMCore/MVMCore/Models/ActionType/AlertModel.swift index f636d99..3d299a3 100644 --- a/MVMCore/MVMCore/Models/ActionType/AlertModel.swift +++ b/MVMCore/MVMCore/Models/ActionType/AlertModel.swift @@ -46,7 +46,7 @@ public class AlertButtonModel: Codable { let typeContainer = try decoder.container(keyedBy: CodingKeys.self) title = try typeContainer.decode(String.self, forKey: .title) - if let style = try? typeContainer.decodeIfPresent(String.self, forKey: .style) { + if let style = try typeContainer.decodeIfPresent(String.self, forKey: .style) { self.style = UIAlertAction.Style(rawValue: style) } action = try typeContainer.decodeModel(codingKey: .action) @@ -101,7 +101,7 @@ public class AlertModel: Codable { message = try typeContainer.decode(String.self, forKey: .message) alertActions = try typeContainer.decode([AlertButtonModel].self, forKey: .alertActions) - if let style = try? typeContainer.decodeIfPresent(String.self, forKey: .style) { + if let style = try typeContainer.decodeIfPresent(String.self, forKey: .style) { self.style = UIAlertController.Style(rawValue: style) } }