From 6c5def32ce47baa0d211a977abef078cc34a222c Mon Sep 17 00:00:00 2001 From: uwaa Date: Mon, 27 Jan 2025 04:18:22 +0000 Subject: [PATCH] dont require user-audio-percentage --- static/js/rot.js | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) 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