From dcc81a2c08b4e088a3083f7dc4ef366c6f0f6c6d Mon Sep 17 00:00:00 2001 From: Scott Pfeil Date: Tue, 2 Aug 2022 11:18:30 -0400 Subject: [PATCH] Clean the load request --- MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler+Extension.swift | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler+Extension.swift b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler+Extension.swift index cfc55fb..48c626f 100644 --- a/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler+Extension.swift +++ b/MVMCore/MVMCore/LoadHandling/MVMCoreLoadHandler+Extension.swift @@ -12,7 +12,7 @@ public extension MVMCoreLoadHandler { /// Performs the request. func performRequest(with requestParameters: MVMCoreRequestParameters, delegateObject: DelegateObject?, additionalData: [AnyHashable : Any]?) async throws { // Makes the request and waits for it. TODO: Any way to take errors into account? - guard let operation = MVMCoreLoadHandler.sharedGlobal()?.loadRequest(requestParameters, dataForPage: additionalData, delegateObject: delegateObject) else { return } + let operation = loadRequest(requestParameters, dataForPage: additionalData, delegateObject: delegateObject) await withCheckedContinuation { continuation in operation.completionBlock = { continuation.resume()