[go: nahoru, domu]

Skip to content
This repository has been archived by the owner on Jun 3, 2021. It is now read-only.

Commit

Permalink
[iOS] Fix bug that when imagesrc is nil, image loader is still called. (
Browse files Browse the repository at this point in the history
  • Loading branch information
wqyfavor authored and zshshr committed Feb 20, 2019
1 parent 19cb632 commit 1fea212
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions ios/sdk/WeexSDK/Sources/Component/WXImageComponent.m
Original file line number Diff line number Diff line change
Expand Up @@ -406,6 +406,9 @@ - (void)updateImage
[[self imageLoader] setImageViewWithURL:(UIImageView*)self.view url:[NSURL URLWithString:newURL] placeholderImage:nil options:extInfo progress:nil completed:nil];
}
newURL = [[self imageSrc] copy];
if ([newURL length] == 0) {
return;
}
WX_REWRITE_URL([self imageSrc], WXResourceTypeImage, self.weexInstance)
NSDictionary *userInfo = @{@"imageQuality":@(self.imageQuality), @"imageSharp":@(self.imageSharp), @"blurRadius":@(self.blurRadius), @"instanceId":[self _safeInstanceId], @"pageURL": self.weexInstance.scriptURL ?: @""};
[[self imageLoader] setImageViewWithURL:(UIImageView*)self.view url:[NSURL URLWithString:newURL] placeholderImage:nil options:userInfo progress:^(NSInteger receivedSize, NSInteger expectedSize) {
Expand Down

0 comments on commit 1fea212

Please sign in to comment.