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