Skip to content

Commit

Permalink
🐛 fix: race condition in check song progress
Browse files Browse the repository at this point in the history
Signed-off-by: SimonShiki <[email protected]>
  • Loading branch information
SimonShiki committed Aug 12, 2024
1 parent 43fe93f commit aaca7eb
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/utils/player.ts
Original file line number Diff line number Diff line change
Expand Up @@ -185,7 +185,7 @@ function setupEventListeners () {
const playing = sharedStore.get(playingJotai);
if (playing) {
const intervalId = setInterval(async () => {
if (!sharedStore.get(playingJotai)) {
if (!sharedStore.get(playingJotai) || !sharedStore.get(backendPlayingJotai)) {
clearInterval(intervalId);
} else {
await updateProgress();
Expand Down

0 comments on commit aaca7eb

Please sign in to comment.