mirror of
https://github.com/Unleash/unleash.git
synced 2025-06-04 01:18:20 +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:
parent
02872f15ee
commit
195cded10b
@ -78,12 +78,6 @@ const App = ({ location, user, fetchUiBootstrap, feedback }: IAppProps) => {
|
|||||||
<SWRConfig value={{
|
<SWRConfig value={{
|
||||||
onError: (error) => {
|
onError: (error) => {
|
||||||
if (!isUnauthorized()) {
|
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({
|
setToastData({
|
||||||
show: true,
|
show: true,
|
||||||
type: 'error',
|
type: 'error',
|
||||||
|
Loading…
Reference in New Issue
Block a user