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

Commit 56c2a1a

Browse files
Merge pull request #1474 from jpierront/master
Avoid app crash when googleSignInResult is null
2 parents 033bada + c48f25d commit 56c2a1a

File tree

1 file changed

+5
-0
lines changed

1 file changed

+5
-0
lines changed

src/firebase.android.ts

+5
Original file line numberDiff line numberDiff line change
@@ -1106,6 +1106,11 @@ firebase.login = arg => {
11061106
if (eventData.requestCode === GOOGLE_SIGNIN_INTENT_ID) {
11071107
appModule.android.off(appModule.AndroidApplication.activityResultEvent, callback);
11081108
const googleSignInResult = com.google.android.gms.auth.api.Auth.GoogleSignInApi.getSignInResultFromIntent(eventData.intent);
1109+
if (googleSignInResult === null) {
1110+
reject("No googleSignInResult, eventData.intent seems to be invalid");
1111+
return;
1112+
}
1113+
11091114
const success = googleSignInResult.isSuccess();
11101115
if (success) {
11111116
const googleSignInAccount = googleSignInResult.getSignInAccount();

0 commit comments

Comments
 (0)