Fix handling of failed image downloads

Summary:
If you have following scenario

1. Have <Image> component with valid URL
2. Due to user action set <Image> to incorrect URL (something that 404s)

Currently 1st image stay visible to the user.
This is the case for both Fabric and Paper.

Paper is being fixed -> https://github.com/facebook/react-native/pull/25919

Reviewed By: fkgozali

Differential Revision: D16708532

fbshipit-source-id: ffdea5421faead4730e7b117a3b9f6e21869da70
This commit is contained in:
Samuel Susla 2019-08-12 09:21:38 -07:00 коммит произвёл Facebook Github Bot
Родитель 5edd1c674c
Коммит 5cde7d29a3
1 изменённых файлов: 2 добавлений и 0 удалений

Просмотреть файл

@ -177,6 +177,8 @@
return;
}
_imageView.image = nil;
std::static_pointer_cast<const ImageEventEmitter>(_eventEmitter)->onError();
}