File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
android/src/main/java/com/raygun/react Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -221,6 +221,11 @@ public void onActivityDestroyed(Activity activity) {
221221 * @param payload - A WritableMap of information to be parsed with this event's occurence.
222222 */
223223 private void sendJSEvent (String eventType , @ Nullable WritableMap payload ) {
224+ if (reactContext == null || !reactContext .hasActiveCatalystInstance ()) {
225+ Log .w ("Raygun" , "Unable to send JS event for " + eventType + " due to an inactive React context." );
226+ return ;
227+ }
228+
224229 reactContext .getJSModule (DeviceEventManagerModule .RCTDeviceEventEmitter .class ).emit (eventType , payload );
225230 }
226231
Original file line number Diff line number Diff line change 11{
22 "name" : " raygun4reactnative" ,
33 "title" : " Raygun4reactnative" ,
4- "version" : " 1.1.3 " ,
4+ "version" : " 1.1.4 " ,
55 "description" : " Raygun React Native SDK" ,
66 "main" : " dist/index.js" ,
77 "typescript" : {
You can’t perform that action at this time.
0 commit comments