diff --git a/client/src/helpers/helpers.js b/client/src/helpers/helpers.js index b79874a9..c335c04e 100644 --- a/client/src/helpers/helpers.js +++ b/client/src/helpers/helpers.js @@ -160,9 +160,11 @@ export const redirectToCurrentProtocol = (values) => { // TODO const redirectCheck = setInterval(() => { fetch(`https://${hostname}${httpsPort}/${hash}`, { mode: 'no-cors' }) - .then(() => { - clearInterval(redirectCheck); - window.location.replace(`https://${hostname}${httpsPort}/${hash}`); + .then((response) => { + if (response) { + clearInterval(redirectCheck); + window.location.replace(`https://${hostname}${httpsPort}/${hash}`); + } }) .catch(() => false); }, CHECK_TIMEOUT);