From 78d3082fc9cb8f02a822998f9c39eb576f1c6472 Mon Sep 17 00:00:00 2001 From: Povilas Staskus <4062343+staskus@users.noreply.github.com> Date: Tue, 23 Apr 2024 10:41:08 +0300 Subject: [PATCH] Update StatsServiceRemoteV2.swift --- Sources/WordPressKit/Services/StatsServiceRemoteV2.swift | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/Sources/WordPressKit/Services/StatsServiceRemoteV2.swift b/Sources/WordPressKit/Services/StatsServiceRemoteV2.swift index 2ae1b68b..be9d554d 100644 --- a/Sources/WordPressKit/Services/StatsServiceRemoteV2.swift +++ b/Sources/WordPressKit/Services/StatsServiceRemoteV2.swift @@ -327,9 +327,8 @@ public extension StatsServiceRemoteV2 { let path = self.path(forEndpoint: "sites/\(siteID)/\(pathComponent)/", withVersion: ._1_1) let properties = StatsEmailsSummaryData.queryProperties(quantity: quantity, sortField: sortField, sortOrder: sortOrder) as [String: AnyObject] - wordPressComRESTAPI.get(path, parameters: properties, success: { [weak self] (response, _) in - guard let self, - let jsonResponse = response as? [String: AnyObject], + wordPressComRESTAPI.get(path, parameters: properties, success: { (response, _) in + guard let jsonResponse = response as? [String: AnyObject], let emailsSummaryData = StatsEmailsSummaryData(jsonDictionary: jsonResponse) else { completion(.failure(ResponseError.decodingFailure))