diff --git a/static/js/find_address.js b/static/js/find_address.js index ca18a763..cf01bb50 100644 --- a/static/js/find_address.js +++ b/static/js/find_address.js @@ -100,6 +100,11 @@ button.disabled = true; var url = text.url + "?" + new URLSearchParams({q: form.elements.q.value}); fetch(url, {headers: {"X-Requested-With": "XMLHttpRequest"}}).then(function (response) { + if (response.redirected) { + // signed out meanwhile: reloading goes to the login form, then back here + location.reload(); + return new Promise(function () {}); + } return response.json(); }).catch(function () { return {error: text.failed};