mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-07 12:30:12 +02:00
...lodash random uses inclusive on both ends
This commit is contained in:
@@ -151,7 +151,7 @@ export const usePlayerStore = createWithEqualityFn<PlayerSlice>()(
|
||||
const index =
|
||||
initialIndex !== undefined
|
||||
? initialIndex
|
||||
: random(0, songsToAddToQueue.length, false);
|
||||
: random(0, songsToAddToQueue.length - 1, false);
|
||||
|
||||
const initialSong = songsToAddToQueue[index];
|
||||
const queueCopy = [...songsToAddToQueue];
|
||||
|
||||
Reference in New Issue
Block a user