diff --git a/frontend/src/store/playlists.jsx b/frontend/src/store/playlists.jsx index 30d01906..8050a7c3 100644 --- a/frontend/src/store/playlists.jsx +++ b/frontend/src/store/playlists.jsx @@ -86,12 +86,16 @@ const usePlaylistsStore = create((set) => ({ })), removePlaylists: (playlistIds) => - set((state) => ({ - playlists: state.playlists.filter( - (playlist) => !playlistIds.includes(playlist.id) - ), - // @TODO: remove playlist profiles here - })), + set((state) => { + const updatedProfiles = { ...state.profiles }; + playlistIds.forEach((id) => delete updatedProfiles[id]); + return { + playlists: state.playlists.filter( + (playlist) => !playlistIds.includes(playlist.id) + ), + profiles: updatedProfiles, + }; + }), setRefreshProgress: (accountIdOrData, data) => set((state) => {