mirror of
https://github.com/zhigang1992/react-native-firebase.git
synced 2026-04-13 09:38:53 +08:00
Merge pull request #1479 from ecexplorer/master
Guard against NPE in deleteChannelGroup
This commit is contained in:
@@ -176,8 +176,13 @@ public class RNFirebaseNotifications extends ReactContextBaseJavaModule implemen
|
||||
|
||||
@ReactMethod
|
||||
public void deleteChannelGroup(String channelId, Promise promise) {
|
||||
notificationManager.deleteChannelGroup(channelId);
|
||||
promise.resolve(null);
|
||||
try {
|
||||
notificationManager.deleteChannelGroup(channelId);
|
||||
promise.resolve(null);
|
||||
} catch (NullPointerException e) {
|
||||
promise.reject("notifications/channel-group-not-found",
|
||||
"The requested NotificationChannelGroup does not exist, have you created it?");
|
||||
}
|
||||
}
|
||||
|
||||
@ReactMethod
|
||||
|
||||
Reference in New Issue
Block a user