mirror of
https://github.com/the-djmaze/snappymail.git
synced 2026-08-29 20:19:22 +03:00
Better fix for #314
This commit is contained in:
parent
20e391cf1c
commit
865f62dbb8
1 changed files with 4 additions and 12 deletions
16
dev/boot.js
16
dev/boot.js
|
|
@ -51,18 +51,10 @@ window.rl = {
|
|||
loadScript(url)
|
||||
.then(() => loadScript(url.replace('/libs.', `/${admin?'admin':'app'}.`)))
|
||||
.then(() => appData.PluginsLink ? loadScript(appData.PluginsLink) : Promise.resolve())
|
||||
.then(() => {
|
||||
if ('complete' == doc.readyState) {
|
||||
cb();
|
||||
} else {
|
||||
let poll = setInterval(()=>{
|
||||
if ('complete' == doc.readyState) {
|
||||
clearInterval(poll);
|
||||
cb();
|
||||
}
|
||||
}, 50);
|
||||
}
|
||||
})
|
||||
.then(() => rl.app.bootstart
|
||||
? cb()
|
||||
: doc.addEventListener('readystatechange', () => 'complete' == doc.readyState && cb())
|
||||
)
|
||||
.catch(e => {
|
||||
showError(e.message);
|
||||
throw e;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue