mirror of
https://github.com/jeffvli/feishin.git
synced 2026-05-09 20:29:36 +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 =
|
const index =
|
||||||
initialIndex !== undefined
|
initialIndex !== undefined
|
||||||
? initialIndex
|
? initialIndex
|
||||||
: random(0, songsToAddToQueue.length, false);
|
: random(0, songsToAddToQueue.length - 1, false);
|
||||||
|
|
||||||
const initialSong = songsToAddToQueue[index];
|
const initialSong = songsToAddToQueue[index];
|
||||||
const queueCopy = [...songsToAddToQueue];
|
const queueCopy = [...songsToAddToQueue];
|
||||||
|
|||||||
Reference in New Issue
Block a user