Skip to content

Commit 47161c9

Browse files
authored
FIX #835: null mNotification (#862)
1 parent c2178bb commit 47161c9

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

lib/android/app/src/main/java/com/wix/reactnativenotifications/RNNotificationsModule.java

+3-1
Original file line numberDiff line numberDiff line change
@@ -88,8 +88,10 @@ public void getInitialNotification(final Promise promise) {
8888
return;
8989
}
9090

91-
InitialNotificationHolder.getInstance().clear();
9291
result = Arguments.fromBundle(notification.asBundle());
92+
InitialNotificationHolder.getInstance().clear();
93+
} catch (NullPointerException e) {
94+
Log.e(LOGTAG, "getInitialNotification: Null pointer exception");
9395
} finally {
9496
promise.resolve(result);
9597
}

lib/android/app/src/main/java/com/wix/reactnativenotifications/core/ReactAppLifecycleFacade.java

+1-1
Original file line numberDiff line numberDiff line change
@@ -47,7 +47,7 @@ public synchronized boolean isReactInitialized() {
4747
return false;
4848
}
4949

50-
return mReactContext.hasActiveCatalystInstance();
50+
return mReactContext.hasActiveReactInstance();
5151
}
5252

5353
@Override

0 commit comments

Comments
 (0)