diff --git a/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java b/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java index 6a9fa4b5..25a8aa4e 100644 --- a/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java +++ b/android/src/main/java/com/geektime/rnonesignalandroid/RNOneSignal.java @@ -536,7 +536,7 @@ public void sendOutcome(final String name, final Callback callback) { OneSignal.sendOutcome(name, new OutcomeCallback() { @Override public void onSuccess(OSOutcomeEvent outcomeEvent) { - if (outcomeEvent) { + if (outcomeEvent != null) { try { callback.invoke(RNUtils.jsonToWritableMap(outcomeEvent.toJSONObject())); } catch (JSONException e) { @@ -555,7 +555,7 @@ public void sendUniqueOutcome(final String name, final Callback callback) { OneSignal.sendUniqueOutcome(name, new OutcomeCallback() { @Override public void onSuccess(OSOutcomeEvent outcomeEvent) { - if (outcomeEvent) { + if (outcomeEvent != null) { try { callback.invoke(RNUtils.jsonToWritableMap(outcomeEvent.toJSONObject())); } catch (JSONException e) { @@ -574,7 +574,7 @@ public void sendOutcomeWithValue(final String name, final float value, final Cal OneSignal.sendOutcomeWithValue(name, value, new OutcomeCallback() { @Override public void onSuccess(OSOutcomeEvent outcomeEvent) { - if (outcomeEvent) { + if (outcomeEvent != null) { try { callback.invoke(RNUtils.jsonToWritableMap(outcomeEvent.toJSONObject())); } catch (JSONException e) {