Skip to content
Browse files

fix display problems when image fails to load (#25969)

This problem was also affecting Fabric and was fixed in D16708532.
When the image resource is changed and the new image resource fails to load, we expect the display image to fail to load, but the image still shows the image that was successfully loaded last time.

## Changelog

[iOS] [Fixed] - fix display problems when image fails to load
Pull Request resolved: #25969

Test Plan:
This is catalyst playground with following code P78264143.
TLDR of the code, it sets URL <Image> that is 404.


Reviewed By: makovkastar

Differential Revision: D16783330

Pulled By: sammy-SC

fbshipit-source-id: 1cb488590ce15d957357f32a73ebf8df6cccf4cd
  • Loading branch information...
jsfu authored and facebook-github-bot committed Aug 14, 2019
1 parent 639da37 commit 71d7d6883cb9a3d18666f04a444de7b4a611b304
Showing with 4 additions and 0 deletions.
  1. +4 −0 Libraries/Image/RCTImageView.m
@@ -347,6 +347,10 @@ - (void)imageLoaderLoadedImage:(UIImage *)loadedImage error:(NSError *)error for

if (error) {
self.image = nil;

if (_onError) {
_onError(@{ @"error": error.localizedDescription });

0 comments on commit 71d7d68

Please sign in to comment.
You can’t perform that action at this time.