From b534d44740daea565d7e37c3512ea9c47825468f Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sat, 12 Oct 2024 06:06:17 +0300 Subject: Fix for NaN+integer --- client/js/radio_emulator.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'client/js/radio_emulator.js') diff --git a/client/js/radio_emulator.js b/client/js/radio_emulator.js index 2df187b..27e8ba2 100644 --- a/client/js/radio_emulator.js +++ b/client/js/radio_emulator.js @@ -60,7 +60,7 @@ function increaseSeconds() { seconds_here = seconds_here+1; youAreHere.innerText = seconds_here; - ProgressBar.value = parseInt(currentTimeP.innerText) + seconds_here; + ProgressBar.value = (parseInt(currentTimeP.innerText) === NaN) ? 0 : parseInt(currentTimeP.innerText) + parseInt(seconds_here); relativeTime.innerText = parseInt(currentTimeP.innerText) + seconds_here; listeningAt.innerText = Math.floor(audioElement.currentTime); return seconds_here; -- cgit v1.2.3