clear error message

This commit is contained in:
AJ ONeal 2018-06-21 11:19:10 +00:00
parent 809c14f91f
commit 4db9a8d53d
1 changed files with 2 additions and 1 deletions

View File

@ -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);