This commit is contained in:
Erik 2023-03-27 15:17:09 +03:00
parent 4346f81e23
commit e16937dac6
Signed by: Navy.gif
GPG Key ID: 2532FBBB61C65A68

View File

@ -46,7 +46,9 @@ const parseResponse = async (response) => {
if (status === 401) { if (status === 401) {
clearSession(); 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')) { if (headers['content-type']?.includes('application/json')) {