diff --git a/web/script.js b/web/script.js index 529ead7..03ee6be 100644 --- a/web/script.js +++ b/web/script.js @@ -119,7 +119,7 @@ playBtn.onclick = () => { volumeSlider.oninput = () => { maxVolume = volumeSlider.value; currentVolumeLabel.textContent = `${maxVolume}%`; - if (!isFading) { + if (!isFading && currentAudio) { currentAudio.volume = maxVolume / 100; currentVolume = maxVolume; }