diff --git a/src/routes/results/[id]/+page.server.ts b/src/routes/results/[id]/+page.server.ts index 66a0932..d11a21b 100644 --- a/src/routes/results/[id]/+page.server.ts +++ b/src/routes/results/[id]/+page.server.ts @@ -14,6 +14,7 @@ export const load: PageServerLoad = async ({ params, parent }) => { result: structuredClone(result), lrc: await getLyricsProcessed(result.songId), song, - playlist: await user.data?.loc?.currentPlaylistId?.let(getPlaylist) + playlist: await user.data?.loc?.currentPlaylistId?.let(getPlaylist), + resultId: params.id } } diff --git a/src/routes/results/[id]/+page.svelte b/src/routes/results/[id]/+page.svelte index cb12507..5e35d45 100644 --- a/src/routes/results/[id]/+page.svelte +++ b/src/routes/results/[id]/+page.svelte @@ -102,7 +102,7 @@ const loc = data.user.data.loc const playlist = data.playlist // Check if this is the latest result for the current playlist session - const isCurrentResult = loc?.lastResultId === data.result._id + const isCurrentResult = loc?.lastResultId === data.resultId // Compute next state immediately if (playlist && loc && isCurrentResult) {