Skip to content

Commit

Permalink
Fix Image component crashing when uri is null (#28061)
Browse files Browse the repository at this point in the history
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
  • Loading branch information
mlazari authored and facebook-github-bot committed Feb 28, 2020
1 parent 30822e3 commit 06b8b15
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion React/Base/RCTConvert.m
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ + (NSIndexSet *)NSIndexSet:(id)json

+ (NSURL *)NSURL:(id)json
{
NSString *path = [self NSString:json];
NSString *path = [self NSString:RCTNilIfNull(json)];
if (!path) {
return nil;
}
Expand Down

0 comments on commit 06b8b15

Please sign in to comment.