Skip to content

Commit 335a437

Browse files
committed
fixed crash on ios7 user device
fixed that string property of NSURLComponents can`t use on iOS7
1 parent cb7a3db commit 335a437

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

SDWebImage/SDWebImageManager.m

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,7 @@ - (NSString *)cacheKeyForURL:(NSURL *)url {
6161
if (NSClassFromString(@"NSURLComponents") && [NSURLComponents instancesRespondToSelector:@selector(string)]) {
6262
NSURLComponents *urlComponents = [[NSURLComponents alloc] initWithURL:url resolvingAgainstBaseURL:NO];
6363
urlComponents.query = nil; // Strip out query parameters.
64-
return urlComponents.string;
64+
return [urlComponents.URL absoluteString];
6565
} else {
6666
return [url absoluteString];
6767
}

0 commit comments

Comments
 (0)