code review: allow try to throw on model decode

This commit is contained in:
Kyle Matthew Hedden 2022-10-28 10:48:58 -04:00
parent 0da94465b3
commit 9ce2023eec

View File

@ -30,7 +30,7 @@ open class ActionAlertHandler: MVMCoreJSONActionHandlerProtocol {
guard let alertObject = MVMCoreAlertObject.alertObject(from: model.alert, additionalData: additionalData, delegateObject: delegateObject, error: &error) else {
throw MVMCoreError.errorObject(error!)
}
(delegateObject?.actionDelegate as? MVMCoreUIActionDelegateProtocol)?.willShowPopup(with: alertObject, alertJson: (try? MVMCoreActionHandler.convertActionToJSON(model)) ?? [:])
(delegateObject?.actionDelegate as? MVMCoreUIActionDelegateProtocol)?.willShowPopup(with: alertObject, alertJson: try MVMCoreActionHandler.convertActionToJSON(model))
_ = await MainActor.run {
MVMCoreAlertHandler.shared()?.showAlert(with: alertObject)
}