Skip to content

Commit

Permalink
[auth] Remove user check when resetting password. Fixes #205
Browse files Browse the repository at this point in the history
  • Loading branch information
chrisbianca committed Jan 31, 2022
1 parent 027b36c commit 9885135
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions auth/useSendPasswordResetEmail.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,11 +18,7 @@ export default (auth: Auth): SendPasswordResetEmailHook => {
const sendPasswordResetEmail = async (email: string) => {
setLoading(true);
try {
if (auth.currentUser) {
await fbSendPasswordResetEmail(auth, email);
} else {
setError(new Error('No user is logged in') as AuthError);
}
await fbSendPasswordResetEmail(auth, email);
} catch (err) {
setError(err as AuthError);
} finally {
Expand Down

0 comments on commit 9885135

Please sign in to comment.