Skip to content

Commit

Permalink
fix getParent NPE
Browse files Browse the repository at this point in the history
  • Loading branch information
Kudo committed Mar 6, 2023
1 parent f388600 commit 4674ae8
Showing 1 changed file with 3 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -1879,6 +1879,9 @@ public void destroy() {
* A helper to get react tag id by given WebView
*/
public static int getId(WebView webView) {
if (webView.getParent() == null) {
return -1;
}
return ((View) webView.getParent()).getId();
}

Expand Down

0 comments on commit 4674ae8

Please sign in to comment.