From 0d4e75202d2bff16cba6332577c57134aa7ab377 Mon Sep 17 00:00:00 2001 From: CEC Date: Tue, 19 Apr 2022 17:38:39 +0200 Subject: [PATCH] Fix lint error --- front/src/Components/UI/ErrorScreen.svelte | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/front/src/Components/UI/ErrorScreen.svelte b/front/src/Components/UI/ErrorScreen.svelte index a9974ae3..7f21178a 100644 --- a/front/src/Components/UI/ErrorScreen.svelte +++ b/front/src/Components/UI/ErrorScreen.svelte @@ -15,9 +15,9 @@ if(!errorScreen.buttonTitle && errorScreen.urlToRedirect) window.location.replace(errorScreen.urlToRedirect); - function click() { - if (errorScreen.urlToRedirect){ - if(errorScreen.urlToRedirect === '/login') connectionManager.logout(); + async function click() { + if (errorScreen.urlToRedirect) { + if (errorScreen.urlToRedirect === '/login') await connectionManager.logout().then().catch(); window.location.replace(errorScreen.urlToRedirect); } else if (errorScreen.type === "redirect" && window.history.length > 2) history.back(); else window.location.reload();