Skip to content

Commit 9885135

Browse files
committed
[auth] Remove user check when resetting password. Fixes #205
1 parent 027b36c commit 9885135

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

auth/useSendPasswordResetEmail.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,7 @@ export default (auth: Auth): SendPasswordResetEmailHook => {
1818
const sendPasswordResetEmail = async (email: string) => {
1919
setLoading(true);
2020
try {
21-
if (auth.currentUser) {
22-
await fbSendPasswordResetEmail(auth, email);
23-
} else {
24-
setError(new Error('No user is logged in') as AuthError);
25-
}
21+
await fbSendPasswordResetEmail(auth, email);
2622
} catch (err) {
2723
setError(err as AuthError);
2824
} finally {

0 commit comments

Comments
 (0)