Fix bug with playlists and update static assets

This commit is contained in:
Tobias Perelstein 2023-11-29 15:58:37 -05:00
parent c5047d8df8
commit 9caa364da3

View File

@ -98,14 +98,18 @@ export function PlaylistsSelection(props) {
let ret = []; let ret = [];
let i = 0; let i = 0;
while (i < playlists.length) { while (i < playlists.length) {
const playlist = playlists[i];
const mediaList = playlist.media_list;
const isChecked = mediaList ? mediaList.indexOf(mediaId) !== -1 : false;
ret.push( ret.push(
<div key={'playlist_' + playlists[i].playlist_id}> <div key={'playlist_' + playlist.playlist_id}>
<PlaylistsSingleSelection <PlaylistsSingleSelection
renderDate={date} renderDate={date}
title={playlists[i].title} title={playlist.title}
privacy={playlists[i].status} privacy={playlist.status}
isChecked={-1 < playlists[i].media_list.indexOf(mediaId)} isChecked={isChecked}
playlistId={playlists[i].playlist_id} playlistId={playlist.playlist_id}
/> />
</div> </div>
); );