[notifications] Ensure error is always logged

This commit is contained in:
Chris Bianca 2018-03-27 17:08:21 +01:00
parent cdbabc1f96
commit 51721a950f
1 changed files with 2 additions and 3 deletions

View File

@ -444,9 +444,8 @@ public class RNFirebaseNotificationManager {
Utils.sendEvent(reactContext, "notifications_notification_displayed", Arguments.fromBundle(notification));
}
} catch (Exception e) {
if (promise == null) {
Log.e(TAG, "Failed to send notification", e);
} else {
Log.e(TAG, "Failed to send notification", e);
if (promise != null) {
promise.reject("notification/display_notification_error", "Could not send notification", e);
}
}