Skip to content

Commit b494d5a

Browse files
authored
Update useSignOut.ts
1 parent 512b475 commit b494d5a

File tree

1 file changed

+1
-5
lines changed

1 file changed

+1
-5
lines changed

auth/useSignOut.ts

Lines changed: 1 addition & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -15,11 +15,7 @@ export default (auth: Auth): SignOutHook => {
1515
setLoading(true);
1616
setError(undefined);
1717
try {
18-
if (auth.currentUser) {
19-
await auth.signOut();
20-
} else {
21-
setError(new Error('No user is logged in') as AuthError);
22-
}
18+
await auth.signOut();
2319
} catch (err) {
2420
setError(err as AuthError);
2521
} finally {

0 commit comments

Comments
 (0)