1
0
mirror of https://github.com/Unleash/unleash.git synced 2025-05-31 01:16:01 +02:00

Don't use window.location.reload for forcing login

- Causes e2e tests to go into an infinite reload loop
This commit is contained in:
Christopher Kolstad 2021-10-15 16:25:47 +02:00
parent 02872f15ee
commit 195cded10b

View File

@ -78,12 +78,6 @@ const App = ({ location, user, fetchUiBootstrap, feedback }: IAppProps) => {
<SWRConfig value={{
onError: (error) => {
if (!isUnauthorized()) {
if (error.status === 401) {
// If we've been in an authorized state,
// but cookie has been deleted (server or client side,
// perform a window reload to reload app
window.location.reload();
}
setToastData({
show: true,
type: 'error',