Fix loading errors

This commit is contained in:
yflory 2020-11-05 17:30:35 +01:00
parent e37cf4b59c
commit 517492f7d3
1 changed files with 6 additions and 3 deletions

View File

@ -317,9 +317,12 @@ button.primary:hover{
var c = types.indexOf(data.type); var c = types.indexOf(data.type);
if (c < current) { return console.error(data); } if (c < current) { return console.error(data); }
try { try {
document.querySelector('.cp-loading-spinner-container').style.display = 'none'; var el1 = document.querySelector('.cp-loading-spinner-container');
document.querySelector('.cp-loading-progress-list').innerHTML = makeList(data); if (el1) { el1.style.display = 'none'; }
document.querySelector('.cp-loading-progress-container').innerHTML = makeBar(data); var el2 = document.querySelector('.cp-loading-progress-list');
if (el2) { el2.innerHTML = makeList(data); }
var el3 = document.querySelector('.cp-loading-progress-container');
if (el3) { el3.innerHTML = makeBar(data); }
} catch (e) { console.error(e); } } catch (e) { console.error(e); }
}; };
window.CryptPad_updateLoadingProgress = updateLoadingProgress; window.CryptPad_updateLoadingProgress = updateLoadingProgress;