diff --git a/static/js/rot.js b/static/js/rot.js index a6d33f31..0c13369e 100644 --- a/static/js/rot.js +++ b/static/js/rot.js @@ -77,7 +77,9 @@ volumeSet(Math.min(1, Math.max(0, audio.volume + number))); } function updateVolumeLabel() { - document.getElementById("user-audio-percentage").innerHTML = Math.round(audio.volume * 100) + "%"; + let txtElm = document.getElementById("user-audio-percentage"); + if (txtElm) + txtElm.innerHTML = Math.round(audio.volume * 100) + "%"; } //Registers a mutation observer for an element. Upon triggering and the callback