We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 027b36c commit 9885135Copy full SHA for 9885135
auth/useSendPasswordResetEmail.ts
@@ -18,11 +18,7 @@ export default (auth: Auth): SendPasswordResetEmailHook => {
18
const sendPasswordResetEmail = async (email: string) => {
19
setLoading(true);
20
try {
21
- if (auth.currentUser) {
22
- await fbSendPasswordResetEmail(auth, email);
23
- } else {
24
- setError(new Error('No user is logged in') as AuthError);
25
- }
+ await fbSendPasswordResetEmail(auth, email);
26
} catch (err) {
27
setError(err as AuthError);
28
} finally {
0 commit comments