Fix the page refreshing on login

This commit is contained in:
Alex Gleason 2024-10-23 13:06:05 -05:00
parent 65c8c68e00
commit 9d07c85f91
No known key found for this signature in database
GPG Key ID: 7211D1F99744FBB7
1 changed files with 1 additions and 1 deletions

View File

@ -207,7 +207,7 @@ export default function auth(oldState: SoapboxAuth = initialState, action: Unkno
} }
// Reload the page when the user logs out or switches accounts. // 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('/'); location.replace('/');
} }