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

Move loading.hide to finally

This commit is contained in:
Bill Thornton 2024-04-19 08:21:58 -04:00
parent 633ae83611
commit 05e03970f3

View file

@ -127,8 +127,6 @@ function triggerChange(select: HTMLSelectElement) {
function populatePlaylists(editorOptions: PlaylistEditorOptions, panel: DialogElement) {
const select = panel.querySelector<HTMLSelectElement>('#selectPlaylistToAddTo');
loading.hide();
if (!select) {
return Promise.reject(new Error('Playlist <select> element is missing'));
}
@ -173,8 +171,6 @@ function populatePlaylists(editorOptions: PlaylistEditorOptions, panel: DialogEl
}
triggerChange(select);
loading.hide();
});
}
@ -236,7 +232,8 @@ function initEditor(content: DialogElement, options: PlaylistEditorOptions, item
populatePlaylists(options, content)
.catch(err => {
console.error('[PlaylistEditor] failed to populate playlists', err);
});
})
.finally(loading.hide);
} else {
content.querySelector('.fldSelectPlaylist')?.classList.add('hide');