Browse Source

Update RNCWKWebView.m

phonezawphyo 5 years ago
parent
commit
02521f542c
No account linked to committer's email address
1 changed files with 2 additions and 0 deletions
  1. 2
    0
      ios/RNCWKWebView.m

+ 2
- 0
ios/RNCWKWebView.m View File

@@ -95,6 +95,8 @@ static NSString *const MessageHanderName = @"ReactNative";
95 95
     [self addSubview:_webView];
96 96
 
97 97
     [self visitSource];
98
+  } else {
99
+    [_webView.configuration.userContentController removeScriptMessageHandlerForName:MessageHanderName];
98 100
   }
99 101
 }
100 102