Fix the page refreshing on login

deno-prep
Alex Gleason 2024-10-23 13:06:05 -05:00
rodzic 65c8c68e00
commit 9d07c85f91
Nie znaleziono w bazie danych klucza dla tego podpisu
ID klucza GPG: 7211D1F99744FBB7
1 zmienionych plików z 1 dodań i 1 usunięć

Wyświetl plik

@ -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('/');
}