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

Merge pull request #3544 from thornbill/catch-home-resume

Add error catching when loading home screen tab
This commit is contained in:
Bill Thornton 2022-04-07 10:54:12 -04:00 committed by GitHub
commit a74ddbb5ca
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -29,15 +29,17 @@ class HomeTab {
const apiClient = this.apiClient;
this.destroyHomeSections();
this.sectionsRendered = true;
return apiClient.getCurrentUser().then(function (user) {
return homeSections.loadSections(view.querySelector('.sections'), apiClient, user, userSettings).then(function () {
return apiClient.getCurrentUser()
.then(user => homeSections.loadSections(view.querySelector('.sections'), apiClient, user, userSettings))
.then(() => {
if (options.autoFocus) {
focusManager.autoFocus(view);
}
}).catch(err => {
console.error(err);
}).finally(() => {
loading.hide();
});
});
}
onPause() {
const sectionsContainer = this.sectionsContainer;