Fix 'Loading playlist...' stuck forever on error
openDownloadMissingModal showed loading overlay but didn't hide it on error paths (playlist not found, fetch failure). The overlay persisted across page navigation, blocking the entire UI.
This commit is contained in:
parent
f4aaab8a66
commit
ad9d5817cf
1 changed files with 2 additions and 0 deletions
|
|
@ -12093,6 +12093,7 @@ async function openDownloadMissingModal(playlistId) {
|
|||
const playlist = spotifyPlaylists.find(p => p.id === playlistId);
|
||||
if (!playlist) {
|
||||
showToast('Could not find playlist data.', 'error');
|
||||
hideLoadingOverlay();
|
||||
return;
|
||||
}
|
||||
|
||||
|
|
@ -12109,6 +12110,7 @@ async function openDownloadMissingModal(playlistId) {
|
|||
playlistTrackCache[playlistId] = tracks;
|
||||
} catch (error) {
|
||||
showToast(`Failed to fetch tracks: ${error.message}`, 'error');
|
||||
hideLoadingOverlay();
|
||||
return;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue