fix: pre-emptive render without valid user

pull/1049/head
Paul 2021-12-25 15:56:47 +00:00
parent f70a347ec8
commit 11043a8cd2
1 changed files with 1 additions and 1 deletions

View File

@ -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 <Redirect to="/login" />;