Skip to content

Commit

Permalink
Set WebView baseURL to 'about:blank' instead of nil
Browse files Browse the repository at this point in the history
Reviewed By: javache

Differential Revision: D2953831

fb-gh-sync-id: 2b11353ee453711f32e19011c13d89c128fa16ab
shipit-source-id: 2b11353ee453711f32e19011c13d89c128fa16ab
  • Loading branch information
nicklockwood authored and facebook-github-bot-0 committed Feb 19, 2016
1 parent 4b97137 commit f961b78
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions React/Views/RCTWebView.m
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,9 @@ - (void)setSource:(NSDictionary *)source
NSString *html = [RCTConvert NSString:source[@"html"]];
if (html) {
NSURL *baseURL = [RCTConvert NSURL:source[@"baseUrl"]];
if (!baseURL) {
baseURL = [NSURL URLWithString:@"about:blank"];
}
[_webView loadHTMLString:html baseURL:baseURL];
return;
}
Expand Down

0 comments on commit f961b78

Please sign in to comment.