Skip to content

Commit a6bdf3e

Browse files
committed
provider data initialized inline
1 parent e2a0f9a commit a6bdf3e

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

packages/auth/src/core/user/user_impl.ts

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -347,10 +347,9 @@ export class UserImpl implements UserInternal {
347347
const coreAccount = response.users[0];
348348
_assert(coreAccount.localId !== undefined, AuthErrorCode.INTERNAL_ERROR);
349349

350-
const providerData: UserInfo[] = [];
351-
if (coreAccount.providerUserInfo !== undefined) {
352-
providerData = extractProviderData(coreAccount.providerUserInfo);
353-
}
350+
const providerData: UserInfo[] =
351+
(coreAccount.providerUserInfo !== undefined) ?
352+
extractProviderData(coreAccount.providerUserInfo) : [];
354353

355354
const isAnonymous =
356355
!(coreAccount.email && coreAccount.passwordHash) && !providerData?.length;

0 commit comments

Comments
 (0)