Skip to content

Commit 06b8b15

Browse files
mlazarifacebook-github-bot
authored andcommitted
Fix Image component crashing when uri is null (#28061)
Summary: This fixes #28060 with a fix similar to f940e7c ## Changelog [iOS] [Fixed] - Fix Image component crashing when uri is null Pull Request resolved: #28061 Test Plan: Run an app on iOS that renders `<Image source={{ uri: null }} />`. It should not crash. ![error](https://user-images.githubusercontent.com/4928274/74492398-6bb23e00-4ed7-11ea-8482-664e1786bba8.png) Reviewed By: sammy-SC Differential Revision: D20080680 Pulled By: PeteTheHeat fbshipit-source-id: 119766a4d7eb6804ffd668418a1f158a712a4fe0
1 parent 30822e3 commit 06b8b15

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

React/Base/RCTConvert.m

+1-1
Original file line numberDiff line numberDiff line change
@@ -75,7 +75,7 @@ + (NSIndexSet *)NSIndexSet:(id)json
7575

7676
+ (NSURL *)NSURL:(id)json
7777
{
78-
NSString *path = [self NSString:json];
78+
NSString *path = [self NSString:RCTNilIfNull(json)];
7979
if (!path) {
8080
return nil;
8181
}

0 commit comments

Comments
 (0)