1
0
Fork 0
mirror of https://github.com/jellyfin/jellyfin-web synced 2025-03-30 19:56:21 +00:00

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