diff --git a/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift b/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift index 91acdb77..0df77ff1 100644 --- a/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift +++ b/MVMCoreUI/Atomic/Protocols/TemplateProtocol.swift @@ -33,7 +33,7 @@ public extension TemplateProtocol { guard let pageJSON = json else { return } let delegateObject = (self as? MVMCoreViewControllerProtocol)?.delegateObject?() as? MVMCoreUIDelegateObject let data = try JSONSerialization.data(withJSONObject: pageJSON) - let decoder = try JSONDecoder.create(delegateObject: delegateObject) + let decoder = JSONDecoder.create(delegateObject: delegateObject) templateModel = try decodeTemplate(using: decoder, from: data) // Add additional required behaviors if applicable. diff --git a/MVMCoreUI/TopAlert/TopNotificationModel.swift b/MVMCoreUI/TopAlert/TopNotificationModel.swift index 7d19bfcf..8e885e22 100644 --- a/MVMCoreUI/TopAlert/TopNotificationModel.swift +++ b/MVMCoreUI/TopAlert/TopNotificationModel.swift @@ -69,7 +69,7 @@ open class TopNotificationModel: Codable { /// Decodes the top alert json to a model. public static func decode(json: [AnyHashable: Any], delegateObject: MVMCoreUIDelegateObject?) throws -> Self { let data = try JSONSerialization.data(withJSONObject: json) - let decoder = try JSONDecoder.create(delegateObject: delegateObject) + let decoder = JSONDecoder.create(delegateObject: delegateObject) return try decoder.decode(self, from: data) }