Set WebView baseURL to 'about:blank' instead of nil

Reviewed By: javache

Differential Revision: D2953831

fb-gh-sync-id: 2b11353ee453711f32e19011c13d89c128fa16ab
shipit-source-id: 2b11353ee453711f32e19011c13d89c128fa16ab
This commit is contained in:
Nick Lockwood 2016-02-19 06:43:36 -08:00 committed by facebook-github-bot-0
parent 4b97137eee
commit f961b78c51
1 changed files with 3 additions and 0 deletions

View File

@ -80,6 +80,9 @@ RCT_NOT_IMPLEMENTED(- (instancetype)initWithCoder:(NSCoder *)aDecoder)
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;
}