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

Commit a7d1aaf

Browse files
[BUG] Reference Error with version 4.2.0 #531
1 parent fad5b93 commit a7d1aaf

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/firebase.ios.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1078,7 +1078,8 @@ function toLoginResult(user) {
10781078
for (let i = 0, l = user.providerData.count; i < l; i++) {
10791079
const firUserInfo = user.providerData.objectAtIndex(i);
10801080
const pid = firUserInfo.valueForKey("providerID");
1081-
if (pid === 'facebook.com') { // FIRFacebookAuthProviderID
1081+
// the app may have dropped Facebook support, so check if the native class is still there
1082+
if (pid === 'facebook.com' && typeof(FBSDKAccessToken) !== "undefined") { // FIRFacebookAuthProviderID
10821083
const fbCurrentAccessToken = FBSDKAccessToken.currentAccessToken();
10831084
providers.push({id: pid, token: fbCurrentAccessToken ? fbCurrentAccessToken.tokenString : null});
10841085
} else {

0 commit comments

Comments
 (0)