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:
parent
633ae83611
commit
05e03970f3
1 changed files with 2 additions and 5 deletions
|
@ -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');
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue