mirror of
https://github.com/status-im/react-native.git
synced 2025-01-19 05:51:01 +00:00
f940e7c4a6
Summary: this is a recent regression because the error appeared in my app (from 0.16 to 0.17). ``` <Image source={{ uri: null }} /> ``` will make an error: ``` [RCTConvert.m:55] Error setting property 'source' of RCTImageView with tag #317: JSON value '<null>' of type NSNull cannot be converted to NSString ``` The solution attached is to check that uri is a NSString and return nil if not (the same way nil is returned in case of invalid url). Closes https://github.com/facebook/react-native/pull/4902 Reviewed By: svcscm Differential Revision: D2779789 Pulled By: nicklockwood fb-gh-sync-id: cfe429ec5e53e63b7b368c06e693424ca8aaa11e