Skip to content

Commit

Permalink
Fixed bug where cached image was not set if you had a completion block
Browse files Browse the repository at this point in the history
  • Loading branch information
kcharwood authored and cnoon committed Sep 26, 2015
1 parent 4da49ab commit b056b3c
Showing 1 changed file with 2 additions and 6 deletions.
8 changes: 2 additions & 6 deletions Source/UIImageView+AlamofireImage.swift
Original file line number Diff line number Diff line change
Expand Up @@ -301,12 +301,8 @@ extension UIImageView {

// Use the image from the image cache if it exists
if let image = imageCache?.imageForRequest(URLRequest.URLRequest, withAdditionalIdentifier: filter?.identifier) {
if let completion = completion {
completion(URLRequest.URLRequest, nil, .Success(image))
} else {
self.image = image
}

completion?(URLRequest.URLRequest, nil, .Success(image))
self.image = image
return
}

Expand Down

0 comments on commit b056b3c

Please # to comment.