Browse Source

Merge branch 'master' into fix-android-overflow-and-adjust-default-render-loading-error

Thibault Malbranche 5 years ago
parent
commit
e600b387ec
No account linked to committer's email address
1 changed files with 7 additions and 1 deletions
  1. 7
    1
      ios/RNCWKWebView.m

+ 7
- 1
ios/RNCWKWebView.m View File

294
     [_webView loadHTMLString:@"" baseURL:nil];
294
     [_webView loadHTMLString:@"" baseURL:nil];
295
     return;
295
     return;
296
   }
296
   }
297
-  [_webView loadRequest:request];
297
+  if (request.URL.host) {
298
+    [_webView loadRequest:request];
299
+  }
300
+  else {
301
+    [_webView loadFileURL:request.URL allowingReadAccessToURL:request.URL];
302
+  }
303
+
298
 }
304
 }
299
 
305
 
300
 -(void)setHideKeyboardAccessoryView:(BOOL)hideKeyboardAccessoryView
306
 -(void)setHideKeyboardAccessoryView:(BOOL)hideKeyboardAccessoryView