From c96b09bb81f0dbda0c5c445f770bf6496272cabb Mon Sep 17 00:00:00 2001 From: Paul Date: Sat, 25 Dec 2021 15:56:47 +0000 Subject: [PATCH] fix: pre-emptive render without valid user --- src/context/revoltjs/CheckAuth.tsx | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/context/revoltjs/CheckAuth.tsx b/src/context/revoltjs/CheckAuth.tsx index 4ec6142b..4064d264 100644 --- a/src/context/revoltjs/CheckAuth.tsx +++ b/src/context/revoltjs/CheckAuth.tsx @@ -13,7 +13,7 @@ interface Props { export const CheckAuth = (props: Props) => { const auth = useApplicationState().auth; const client = useClient(); - const ready = auth.isLoggedIn() && typeof client?.user !== "undefined"; + const ready = auth.isLoggedIn() && !!client?.user; if (props.auth && !ready) { return ;