From 9d07c85f918f18bd7c567df2102eba1435ce134b Mon Sep 17 00:00:00 2001 From: Alex Gleason Date: Wed, 23 Oct 2024 13:06:05 -0500 Subject: [PATCH] Fix the page refreshing on login --- src/reducers/auth.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/reducers/auth.ts b/src/reducers/auth.ts index b5145a340..64934a665 100644 --- a/src/reducers/auth.ts +++ b/src/reducers/auth.ts @@ -207,7 +207,7 @@ export default function auth(oldState: SoapboxAuth = initialState, action: Unkno } // Reload the page when the user logs out or switches accounts. - if (action.type === AUTH_LOGGED_OUT || oldState.me !== state.me) { + if (action.type === AUTH_LOGGED_OUT || (oldState.me && (oldState.me !== state.me))) { location.replace('/'); }