mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 12:09:20 +03:00
Resolve #316
This commit is contained in:
parent
8c8c414bda
commit
873c9ebd8c
1 changed files with 12 additions and 1 deletions
13
dev/boot.js
13
dev/boot.js
|
|
@ -51,7 +51,18 @@ window.rl = {
|
|||
loadScript(url)
|
||||
.then(() => loadScript(url.replace('/libs.', `/${admin?'admin':'app'}.`)))
|
||||
.then(() => appData.PluginsLink ? loadScript(appData.PluginsLink) : Promise.resolve())
|
||||
.then(() => ('complete' == doc.readyState) ? cb() : doc.addEventListener('DOMContentLoaded', cb))
|
||||
.then(() => {
|
||||
if ('complete' == doc.readyState) {
|
||||
cb();
|
||||
} else {
|
||||
let poll = setInterval(()=>{
|
||||
if ('complete' == doc.readyState) {
|
||||
clearInterval(poll);
|
||||
cb();
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
})
|
||||
.catch(e => {
|
||||
showError(e.message);
|
||||
throw e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue