[bugfix]: fix repeat one with shuffle and one track
This commit is contained in:
parent
f467a85a86
commit
47ce0ed47b
1 changed files with 8 additions and 7 deletions
|
@ -342,13 +342,14 @@ export const usePlayerStore = create<PlayerSlice>()(
|
|||
else previousSongIndex = shuffledIndex - 1;
|
||||
}
|
||||
|
||||
const next = nextSongIndex
|
||||
? (queue.find(
|
||||
(song) =>
|
||||
song.uniqueId ===
|
||||
shuffledQueue[nextSongIndex as number],
|
||||
) as QueueSong)
|
||||
: undefined;
|
||||
const next =
|
||||
nextSongIndex !== undefined
|
||||
? (queue.find(
|
||||
(song) =>
|
||||
song.uniqueId ===
|
||||
shuffledQueue[nextSongIndex as number],
|
||||
) as QueueSong)
|
||||
: undefined;
|
||||
|
||||
const previous = queue.find(
|
||||
(song) => song.uniqueId === shuffledQueue[shuffledIndex - 1],
|
||||
|
|
Reference in a new issue