Skip to content

Commit

Permalink
fix(ios): Fix crash when opening 4xx pages with no description. (#3416)
Browse files Browse the repository at this point in the history
  • Loading branch information
bimusiek committed Jun 4, 2024
1 parent a45788e commit 91d76ec
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions apple/RNCWebView.mm
Original file line number Diff line number Diff line change
Expand Up @@ -109,7 +109,7 @@ - (instancetype)initWithFrame:(CGRect)frame
.lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
.title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
.code = [[dictionary valueForKey:@"code"] intValue],
.description = std::string([[dictionary valueForKey:@"description"] UTF8String]),
.description = std::string([[dictionary valueForKey:@"description"] UTF8String] ?: ""),
.canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
.canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
.loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue]),
Expand Down Expand Up @@ -230,7 +230,7 @@ - (instancetype)initWithFrame:(CGRect)frame
.lockIdentifier = [[dictionary valueForKey:@"lockIdentifier"] doubleValue],
.title = std::string([[dictionary valueForKey:@"title"] UTF8String]),
.statusCode = [[dictionary valueForKey:@"statusCode"] intValue],
.description = std::string([[dictionary valueForKey:@"description"] UTF8String]),
.description = std::string([[dictionary valueForKey:@"description"] UTF8String] ?: ""),
.canGoBack = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
.canGoForward = static_cast<bool>([[dictionary valueForKey:@"canGoBack"] boolValue]),
.loading = static_cast<bool>([[dictionary valueForKey:@"loading"] boolValue])
Expand Down

0 comments on commit 91d76ec

Please sign in to comment.