From b96b3dd5efda71f15a1f10a8b3462a9cc26e78fb Mon Sep 17 00:00:00 2001 From: Robin Townsend Date: Wed, 9 Aug 2023 12:00:13 -0400 Subject: [PATCH] Fix logging out getting the app stuck on a 'loading' screen --- src/ClientContext.tsx | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/ClientContext.tsx b/src/ClientContext.tsx index 3e471eb8..f7ceea9f 100644 --- a/src/ClientContext.tsx +++ b/src/ClientContext.tsx @@ -218,7 +218,7 @@ export const ClientProvider: FC = ({ children }) => { }); } else { clearSession(); - setInitClientState(undefined); + setInitClientState(null); } }, [initClientState?.client] @@ -233,7 +233,7 @@ export const ClientProvider: FC = ({ children }) => { await client.logout(true); await client.clearStores(); clearSession(); - setInitClientState(undefined); + setInitClientState(null); history.push("/"); PosthogAnalytics.instance.setRegistrationType(RegistrationType.Guest); }, [history, initClientState?.client]);