aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorkaotisk <kaotisk@arching-kaos.org>2024-10-12 06:06:17 +0300
committerkaotisk <kaotisk@arching-kaos.org>2024-10-12 06:06:17 +0300
commitb534d44740daea565d7e37c3512ea9c47825468f (patch)
treefc8892306f81cacfd3b63916bc474fe034a1c919
parent279fed865c9033f0127dd4c3871f2a1315178efc (diff)
downloadarching-kaos-radio-b534d44740daea565d7e37c3512ea9c47825468f.tar.gz
arching-kaos-radio-b534d44740daea565d7e37c3512ea9c47825468f.tar.bz2
arching-kaos-radio-b534d44740daea565d7e37c3512ea9c47825468f.zip
Fix for NaN+integer
-rw-r--r--client/js/radio_emulator.js2
1 files changed, 1 insertions, 1 deletions
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;