DylanVann / react-native-fast-image

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

Android crash issue fixed when URL is undefined in react-native-fast-image #878

Open rohitiglas opened 2 years ago

rohitiglas commented 2 years ago

Describe the bug Android app was crashing due to undefined image URL and URI because there is no null/undefined check in the library and We are using Glide for showing the image .It will not accept undefined/Null so that's It is crashing.

I have added null/undefined check when using Fast-Image from React-Native.

const isValidFastImageUrl = (imageUrl) => imageUrl?.includes(undefined);

<FastImage source={isValidFastImageUrl(imagePath) ? placeHolderImg : {uri: imagePath}} resizeMode="contain" />

Screenshot 2022-02-19 at 12 42 14 PM