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

Commit 2896b69

Browse files
committed
Fixed null exception when converting profileImageUrl
1 parent 55f9489 commit 2896b69

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

firebase.android.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -388,7 +388,7 @@ firebase.getCurrentUser = function (arg) {
388388
uid: user.getUid(),
389389
name: user.getDisplayName(),
390390
email: user.getEmail(),
391-
profileImageURL: user.getPhotoUrl().toString()
391+
profileImageURL: user.getPhotoUrl() ? user.getPhotoUrl().toString() : null
392392
});
393393
} else {
394394
reject();
@@ -429,7 +429,7 @@ function toLoginResult(user) {
429429
name: user.getDisplayName(),
430430
email: user.getEmail(),
431431
// expiresAtUnixEpochSeconds: authData.getExpires(),
432-
profileImageURL: user.getPhotoUrl().toString()
432+
profileImageURL: user.getPhotoUrl() ? user.getPhotoUrl().toString() : null
433433
// token: user.getToken() // can be used to auth with a backend server
434434
};
435435
}

0 commit comments

Comments
 (0)