Przeglądaj źródła

Merge pull request #319 from strawb3rryx7/master

strongSelf turned to only self. (Swift 4.2)
Ashley Mills 6 lat temu
rodzic
commit
fc597be0d9
1 zmienionych plików z 3 dodań i 3 usunięć
  1. 3 3
      Sources/Reachability.swift

+ 3 - 3
Sources/Reachability.swift

@@ -238,9 +238,9 @@ fileprivate extension Reachability {
         let block = connection != .none ? whenReachable : whenUnreachable
 
         DispatchQueue.main.async { [weak self] in
-            guard let strongSelf = self else { return }
-            block?(strongSelf)
-            strongSelf.notificationCenter.post(name: .reachabilityChanged, object: strongSelf)
+            guard let self = self else { return }
+            block?(self)
+            self.notificationCenter.post(name: .reachabilityChanged, object: self)
         }
     }
 }