fix removing playlist element

AuthorKonata <konata@posteo.jp>
Date
Commite28f29e7d50b33f0348cbde034cd7978f2cfe8e7
Parent000c15d
1 file changed, 1 insertion(+), 1 deletion(-)
▾Mwebclient/src/components/Playlist.tsx
@@ -33,7 +33,7 @@ interface PlaylistProps {
export default function Playlist(props: PlaylistProps) {
const [showActionButtons, setShowActionButtons] = createSignal(true);
function removeFromPlaylist(id: string) {
props.playNext();
if (id === props.playerState.currentTrack?.id) props.playNext();
const newPlaylist = props.playlist().filter((i) => i.id !== id);
props.setPlaylist(newPlaylist);
}