Skip to content

Commit

Permalink
fix(messaging, ios): return after resolving to avoid useless work
Browse files Browse the repository at this point in the history
  • Loading branch information
mikehardy committed Aug 15, 2021
1 parent 9d11ce9 commit 491436f
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions packages/messaging/ios/RNFBMessaging/RNFBMessagingModule.m
Original file line number Diff line number Diff line change
Expand Up @@ -247,6 +247,7 @@ - (NSDictionary *)constantsToExport {
if (@available(iOS 10.0, *)) {
if ([UIApplication sharedApplication].isRegisteredForRemoteNotifications == YES) {
resolve(@([RCTConvert BOOL:@(YES)]));
return;
} else {
[[RNFBMessagingAppDelegate sharedInstance] setPromiseResolve:resolve andPromiseReject:reject];
}
Expand Down

0 comments on commit 491436f

Please sign in to comment.