Web: Fixed error for selector.

This commit is contained in:
Tatiana Lopaeva 2023-11-07 10:32:37 +03:00
parent 5adfbb940d
commit 467696c675

View File

@ -167,14 +167,14 @@ class AxiosClient {
}
break;
case 403:
if (isSelector) return;
const pathname = window.location.pathname;
const isArchived = pathname.indexOf("/rooms/archived") !== -1;
const isRooms =
pathname.indexOf("/rooms/shared") !== -1 || isArchived;
if (isRooms) {
if (isRooms && !isSelector) {
setTimeout(() => {
window.DocSpace.navigate(isArchived ? "/archived" : "/");
}, 1000);