From e16937dac6aaa4d3385c541dd48598e213da6f0a Mon Sep 17 00:00:00 2001 From: "Navy.gif" Date: Mon, 27 Mar 2023 15:17:09 +0300 Subject: [PATCH] fix --- src/util/Util.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/util/Util.js b/src/util/Util.js index 2a6f4f0..f50b512 100644 --- a/src/util/Util.js +++ b/src/util/Util.js @@ -46,7 +46,9 @@ const parseResponse = async (response) => { if (status === 401) { clearSession(); - if(!location.pathname.includes('/login') && !location.pathname.includes('/register')) location.pathname = '/login'; + if (!location.pathname.includes('/login') + && !location.pathname.includes('/register') + && location.pathname !== '/') location.pathname = '/login'; } if (headers['content-type']?.includes('application/json')) {