diff options
-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; |