Explorar el Código

Merge pull request #1729 from onevcat/fix/optional-retry

Allow retry modifier accept nil value
Wei Wang hace 4 años
padre
commit
7786164172
Se han modificado 1 ficheros con 1 adiciones y 1 borrados
  1. 1 1
      Sources/General/KFOptionsSetter.swift

+ 1 - 1
Sources/General/KFOptionsSetter.swift

@@ -287,7 +287,7 @@ extension KFOptionSetter {
     /// Sets a retry strategy that will be used when something gets wrong during the image retrieving.
     /// Sets a retry strategy that will be used when something gets wrong during the image retrieving.
     /// - Parameter strategy: The provided strategy to define how the retrying should happen.
     /// - Parameter strategy: The provided strategy to define how the retrying should happen.
     /// - Returns: A `Self` value with changes applied.
     /// - Returns: A `Self` value with changes applied.
-    public func retry(_ strategy: RetryStrategy) -> Self {
+    public func retry(_ strategy: RetryStrategy?) -> Self {
         options.retryStrategy = strategy
         options.retryStrategy = strategy
         return self
         return self
     }
     }