fix stop button guard to work after clear

This commit is contained in:
Armin 2026-07-08 19:46:57 +02:00
commit 0f14d8da94

View file

@ -1625,7 +1625,7 @@ pauseBtn.addEventListener('click', () => {
}
});
stopBtn.addEventListener('click', () => {
if (currentIndex < 0) return;
if (currentIndex < 0 && audio.paused) return;
audio.pause();
if (isCrossfading) audioNext.pause();
audio.currentTime = 0;