Add redirect directly without showing ErrorScreen

This commit is contained in:
CEC
2022-04-20 10:54:27 +02:00
parent 60ec09836b
commit 8d771d8442
2 changed files with 10 additions and 5 deletions
+1 -3
View File
@@ -13,12 +13,10 @@
let errorScreen = get(errorScreenStore);
if (!errorScreen.buttonTitle && errorScreen.urlToRedirect) window.location.replace(errorScreen.urlToRedirect);
function click() {
if (errorScreen.urlToRedirect) {
if (errorScreen.urlToRedirect === "/login") void connectionManager.logout();
else window.location.replace(errorScreen.urlToRedirect);
else window.location.assign(errorScreen.urlToRedirect);
} else if (errorScreen.type === "redirect" && window.history.length > 2) history.back();
else window.location.reload();
}