From 5eacb4e3cb245fac17f22ab08c11aa69ec38a311 Mon Sep 17 00:00:00 2001 From: Kendall Garner <17521368+kgarner7@users.noreply.github.com> Date: Sun, 6 Jul 2025 21:26:30 -0700 Subject: [PATCH] ...lodash random uses inclusive on both ends --- src/renderer/store/player.store.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/renderer/store/player.store.ts b/src/renderer/store/player.store.ts index 5229ebe1..eeabefd8 100644 --- a/src/renderer/store/player.store.ts +++ b/src/renderer/store/player.store.ts @@ -151,7 +151,7 @@ export const usePlayerStore = createWithEqualityFn()( const index = initialIndex !== undefined ? initialIndex - : random(0, songsToAddToQueue.length, false); + : random(0, songsToAddToQueue.length - 1, false); const initialSong = songsToAddToQueue[index]; const queueCopy = [...songsToAddToQueue];