fix(android): add null reference check for onMessage on android (#770)
This commit is contained in:
parent
9250c054c6
commit
12db6956a9
|
@ -994,6 +994,9 @@ public class RNCWebViewManager extends SimpleViewManager<WebView> {
|
|||
webView.post(new Runnable() {
|
||||
@Override
|
||||
public void run() {
|
||||
if (mRNCWebViewClient == null) {
|
||||
return;
|
||||
}
|
||||
WritableMap data = mRNCWebViewClient.createWebViewEvent(webView, webView.getUrl());
|
||||
data.putString("data", message);
|
||||
dispatchEvent(webView, new TopMessageEvent(webView.getId(), data));
|
||||
|
|
Loading…
Reference in New Issue