Skip to content

Commit

Permalink
Added condition to get view from view or engine
Browse files Browse the repository at this point in the history
  • Loading branch information
alexcortes committed Sep 1, 2022
1 parent 582e588 commit a89c603
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/android/LocalNotification.java
Original file line number Diff line number Diff line change
Expand Up @@ -776,7 +776,7 @@ private static synchronized void sendJavascript(final String js) {
((Activity) (view.getContext())).runOnUiThread(new Runnable() {
public void run() {
view.loadUrl("javascript:" + js);
View engineView = view.getEngine().getView();
View engineView = view.getEngine() != null ? view.getEngine().getView() : view.getView();

if (!isInForeground()) {
engineView.dispatchWindowVisibilityChanged(View.VISIBLE);
Expand Down

0 comments on commit a89c603

Please sign in to comment.