Skip to content

Commit 03511fa

Browse files
committed
refactor: Remove unnecessary await in error handling methods
1 parent 582f192 commit 03511fa

File tree

1 file changed

+6
-6
lines changed
  • packages/firebaseui-core/src

1 file changed

+6
-6
lines changed

packages/firebaseui-core/src/auth.ts

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ export async function fuiSignInWithEmailAndPassword(
8787
const result = await signInWithCredential(auth, credential);
8888
return handlePendingCredential(result);
8989
} catch (error) {
90-
return await handleFirebaseError(error, opts);
90+
return handleFirebaseError(error, opts);
9191
}
9292
}
9393

@@ -114,7 +114,7 @@ export async function fuiCreateUserWithEmailAndPassword(
114114
const result = await createUserWithEmailAndPassword(auth, email, password);
115115
return handlePendingCredential(result);
116116
} catch (error) {
117-
return await handleFirebaseError(error, opts);
117+
return handleFirebaseError(error, opts);
118118
}
119119
}
120120

@@ -157,7 +157,7 @@ export async function fuiConfirmPhoneNumber(
157157
const result = await signInWithCredential(auth, credential);
158158
return handlePendingCredential(result);
159159
} catch (error) {
160-
return await handleFirebaseError(error, opts);
160+
return handleFirebaseError(error, opts);
161161
}
162162
}
163163

@@ -233,7 +233,7 @@ export async function fuiSignInWithEmailLink(
233233
window.localStorage.removeItem('emailLinkAnonymousUpgrade');
234234
return handlePendingCredential(result);
235235
} catch (error) {
236-
return await handleFirebaseError(error, opts);
236+
return handleFirebaseError(error, opts);
237237
}
238238
}
239239

@@ -248,7 +248,7 @@ export async function fuiSignInAnonymously(
248248
const result = await signInAnonymously(auth);
249249
return handlePendingCredential(result);
250250
} catch (error) {
251-
return await handleFirebaseError(error, opts);
251+
return handleFirebaseError(error, opts);
252252
}
253253
}
254254

@@ -297,6 +297,6 @@ export async function fuiCompleteEmailLinkSignIn(
297297
window.localStorage.removeItem('emailForSignIn');
298298
return handlePendingCredential(result);
299299
} catch (error) {
300-
return await handleFirebaseError(error, opts);
300+
return handleFirebaseError(error, opts);
301301
}
302302
}

0 commit comments

Comments
 (0)