fix: also play tracks with index 0

This commit is contained in:
Lei Nelissen
2025-03-05 22:16:09 +01:00
parent 6685e83ebf
commit c2d7d81de8

View File

@@ -150,7 +150,7 @@ const TrackListView: React.FC<TrackListViewProps> = ({
const shuffleEntity = useCallback(() => { playTracks(trackIds, { shuffle: true }); }, [playTracks, trackIds]);
const selectTrack = useCallback(async (trackId: string) => {
const index = trackIds.findIndex((id) => id === trackId);
if (index) {
if (index >= 0) {
await playTracks(trackIds, { playIndex: index });
}
}, [playTracks, trackIds]);