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 512b475 commit b494d5aCopy full SHA for b494d5a
auth/useSignOut.ts
@@ -15,11 +15,7 @@ export default (auth: Auth): SignOutHook => {
15
setLoading(true);
16
setError(undefined);
17
try {
18
- if (auth.currentUser) {
19
- await auth.signOut();
20
- } else {
21
- setError(new Error('No user is logged in') as AuthError);
22
- }
+ await auth.signOut();
23
} catch (err) {
24
setError(err as AuthError);
25
} finally {
0 commit comments