Fix the page refreshing on login
This commit is contained in:
parent
65c8c68e00
commit
9d07c85f91
|
@ -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('/');
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue