Browse Source

fix(WKWebView): iOS crash when WebView's title is nil (#521)

TMomemt 5 years ago
parent
commit
7a91221926
1 changed files with 1 additions and 1 deletions
  1. 1
    1
      ios/RNCWKWebView.m

+ 1
- 1
ios/RNCWKWebView.m View File

460
 {
460
 {
461
   NSDictionary *event = @{
461
   NSDictionary *event = @{
462
     @"url": _webView.URL.absoluteString ?: @"",
462
     @"url": _webView.URL.absoluteString ?: @"",
463
-    @"title": _webView.title,
463
+    @"title": _webView.title ?: @"",
464
     @"loading" : @(_webView.loading),
464
     @"loading" : @(_webView.loading),
465
     @"canGoBack": @(_webView.canGoBack),
465
     @"canGoBack": @(_webView.canGoBack),
466
     @"canGoForward" : @(_webView.canGoForward)
466
     @"canGoForward" : @(_webView.canGoForward)