Skip to content
This repository was archived by the owner on Sep 15, 2025. It is now read-only.

Commit 62aa153

Browse files
committed
Remove unnecessary guard condition
1 parent bafd565 commit 62aa153

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

WordPressKit/SharingServiceRemote.swift

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -45,16 +45,12 @@ open class SharingServiceRemote: ServiceRemoteWordPressComREST {
4545
let params = ["type": "publicize"]
4646

4747
wordPressComRestApi.GET(path, parameters: params as [String: AnyObject]?) { responseObject, httpResponse in
48-
guard let onSuccess = success else {
49-
return
50-
}
51-
5248
guard let responseDict = responseObject as? NSDictionary else {
5349
failure?(self.errorForUnexpectedResponse(httpResponse))
5450
return
5551
}
5652

57-
onSuccess(self.remotePublicizeServicesFromDictionary(responseDict))
53+
success?(self.remotePublicizeServicesFromDictionary(responseDict))
5854

5955
} failure: { error, _ in
6056
failure?(error)

0 commit comments

Comments
 (0)