From 4db9a8d53d58963828b00b5018a1ad2a241c0e18 Mon Sep 17 00:00:00 2001 From: AJ ONeal Date: Thu, 21 Jun 2018 11:19:10 +0000 Subject: [PATCH] clear error message --- lib/extensions/admin/login/js/app.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/lib/extensions/admin/login/js/app.js b/lib/extensions/admin/login/js/app.js index f8f29ab..c717a12 100644 --- a/lib/extensions/admin/login/js/app.js +++ b/lib/extensions/admin/login/js/app.js @@ -99,12 +99,13 @@ function init() { return resp.json().then(function (data) { console.log('Data:'); console.log(data); + document.querySelector('body').hidden = false; if (data.error) { document.querySelector('.js-error').hidden = false; document.querySelector('.js-magic-link').innerText = magic; + window.alert("Something went wrong. Perhaps an bad or expired link."); return; } - document.querySelector('body').hidden = false; document.querySelector('.js-magic').hidden = false; document.querySelector('.js-hostname').innerText = data.hostname || 'Device'; //document.querySelector('.js-token-data').innerText = JSON.stringify(data, null, 2);