Skip to content
This repository was archived by the owner on Apr 4, 2023. It is now read-only.

Commit b5585cf

Browse files
committed
Check that firebase is configured before calling FIRAuth.auth()
1 parent d3347e2 commit b5585cf

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/firebase.ios.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ function addBackgroundRemoteNotificationHandler(appDelegate) {
5757
if (typeof(FIRMessaging) !== "undefined") {
5858
appDelegate.prototype.applicationDidReceiveRemoteNotificationFetchCompletionHandler = (app, notification, completionHandler) => {
5959
// Pass notification to auth and check if they can handle it (in case phone auth is being used), see https://firebase.google.com/docs/auth/ios/phone-auth
60-
if (FIRAuth.auth().canHandleNotification(notification)) {
60+
if (firebase._configured && FIRAuth.auth().canHandleNotification(notification)) {
6161
completionHandler(UIBackgroundFetchResult.NoData);
6262
return;
6363
}

0 commit comments

Comments
 (0)