Wait for initialization to complete

This commit is contained in:
Dmitry Lyzo 2020-08-04 09:39:34 +03:00
parent 4b84e6c0aa
commit 07a54e9303

View File

@ -615,6 +615,7 @@ function initClient() {
}
var localApiClient;
let promise;
(function () {
var urlArgs = 'v=' + (window.dashboardVersion || new Date().getDate());
@ -696,7 +697,7 @@ function initClient() {
onError: onRequireJsError
});
require(['fetch'])
promise = require(['fetch'])
.then(() => require(['jQuery', 'polyfill', 'fast-text-encoding', 'intersection-observer', 'classlist-polyfill', 'css!assets/css/site', 'jellyfin-noto'], (jQuery) => {
// Expose jQuery globally
window.$ = jQuery;
@ -1107,7 +1108,7 @@ function initClient() {
});
})();
return onWebComponentsReady();
promise.then(onWebComponentsReady);
}
initClient();