mirror of
https://github.com/zhigang1992/react-native.git
synced 2026-02-11 22:32:38 +08:00
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:
committed by
facebook-github-bot-0
parent
4b97137eee
commit
f961b78c51
@@ -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;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user