diff options
author | kaotisk <kaotisk@arching-kaos.org> | 2024-10-12 06:06:17 +0300 |
---|---|---|
committer | kaotisk <kaotisk@arching-kaos.org> | 2024-10-12 06:06:17 +0300 |
commit | b534d44740daea565d7e37c3512ea9c47825468f (patch) | |
tree | fc8892306f81cacfd3b63916bc474fe034a1c919 /client | |
parent | 279fed865c9033f0127dd4c3871f2a1315178efc (diff) | |
download | arching-kaos-radio-b534d44740daea565d7e37c3512ea9c47825468f.tar.gz arching-kaos-radio-b534d44740daea565d7e37c3512ea9c47825468f.tar.bz2 arching-kaos-radio-b534d44740daea565d7e37c3512ea9c47825468f.zip |
Fix for NaN+integer
Diffstat (limited to 'client')
-rw-r--r-- | client/js/radio_emulator.js | 2 |
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; |