From 3677668b5193979db89c4fc38ea9f3db72a31c6d Mon Sep 17 00:00:00 2001 From: Vitalii Lysak Date: Thu, 11 Aug 2022 09:28:13 +0300 Subject: SILABMC-236: clean --- src/views/_sila/Login/Login.vue | 13 ++++++------- 1 file changed, 6 insertions(+), 7 deletions(-) (limited to 'src/views') diff --git a/src/views/_sila/Login/Login.vue b/src/views/_sila/Login/Login.vue index db6a6a09..4c8fd4a6 100644 --- a/src/views/_sila/Login/Login.vue +++ b/src/views/_sila/Login/Login.vue @@ -128,15 +128,14 @@ export default { ); }) .then((passwordChangeRequired) => { - if (passwordChangeRequired) { - setTimeout(() => { + // For some reason, the request fails if there is a redirect after it + setTimeout(() => { + if (passwordChangeRequired) { window.location.href = '/change-password'; - }, 1000); - } else { - setTimeout(() => { + } else { window.location.href = '/'; - }, 1000); - } + } + }, 1000); }) .catch((error) => console.log(error)) .finally(() => (this.disableSubmitButton = false)); -- cgit v1.2.3