DylanVann / react-native-fast-image

🚩 FastImage, performant React Native image component.
MIT License
8.09k stars 1.47k forks source link

Android onError is not called when uri is empty or null #1028

Open alex-amaral opened 4 months ago

alex-amaral commented 4 months ago

Describe the bug When uri is empty or null it doesn't fire onError callback for Android.

To Reproduce Steps to reproduce the behavior if possible, or a link to a reproduction repo:

  1. Pass an image with source.uri as an empty string
  2. Put a console.log on onError callback of FastImage
  3. See the log is not dispatched

Expected behavior Passing an empty string or a null string as a source uri should fail the image load and React Native should be notified about that. This works properly on iOS

Dependency versions

Note: if these are not the latest versions of each I recommend updating as extra effort will not be taken to be backwards compatible, and updating might resolving your issue.