Merge branch 'bugfix/open_page_request_parameters' into 'develop'

copy fix

See merge request BPHV_MIPS/mvm_core!230
This commit is contained in:
Pfeil, Scott Robert 2022-09-20 21:46:04 +00:00
commit f8dec38c13

View File

@ -13,11 +13,12 @@ open class ActionOpenPageHandler: MVMCoreJSONActionHandlerProtocol {
open func performAction(with JSON: [AnyHashable : Any], model: ActionModelProtocol, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws { open func performAction(with JSON: [AnyHashable : Any], model: ActionModelProtocol, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws {
guard let model = model as? ActionOpenPageModel else { return } guard let model = model as? ActionOpenPageModel else { return }
let requestParameters: MVMCoreRequestParameters = model.requestParameters.copy() as! MVMCoreRequestParameters
do { do {
if let closure = delegateObject?.actionDelegate?.handleOpenPage { if let closure = delegateObject?.actionDelegate?.handleOpenPage {
// Legacy code will use the old handler function and break the task chain here. // Legacy code will use the old handler function and break the task chain here.
closure(model.requestParameters, JSON, additionalData) closure(requestParameters, JSON, additionalData)
} else if let operation = try await performRequestAddingClientParameters(with: model.requestParameters, model: model, delegateObject: delegateObject, additionalData: additionalData) { } else if let operation = try await performRequestAddingClientParameters(with: requestParameters, model: model, delegateObject: delegateObject, additionalData: additionalData) {
await withCheckedContinuation { continuation in await withCheckedContinuation { continuation in
operation.completionBlock = { operation.completionBlock = {
continuation.resume() continuation.resume()