From ce35f3274c6f637b38e1b071d005d2c4daeddedd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Petter=20H=C3=A4ggholm?= Date: Thu, 4 Jan 2018 12:18:35 -0800 Subject: [PATCH] Avoid resolving promise twice if channel already exists --- .../src/main/java/com/evollu/react/fcm/FIRMessagingModule.java | 1 + 1 file changed, 1 insertion(+) diff --git a/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java b/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java index ff426b8..adee2a8 100644 --- a/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java +++ b/android/src/main/java/com/evollu/react/fcm/FIRMessagingModule.java @@ -106,6 +106,7 @@ public class FIRMessagingModule extends ReactContextBaseJavaModule implements Li } if (mngr.getNotificationChannel(id) != null) { promise.resolve(null); + return; } // NotificationChannel channel = new NotificationChannel( -- 2.26.2