* VRFS-2249 - protect against less than 1

This commit is contained in:
Seth Call 2014-09-22 14:24:44 -05:00
parent 61f0bd2aa0
commit 7645acac72
1 changed files with 5 additions and 2 deletions

View File

@ -115,10 +115,13 @@
var timer = setInterval(function(){
var $countdown = $('#client_update .countdown-secs');
var countdown = parseInt($countdown.text());
$countdown.text(countdown - 1);
if(countdown == 0) {
if(countdown <= 0) {
clearInterval(timer);
}
else {
$countdown.text(countdown - 1);
}
}, rounded * 1000);
updateClientUpdateDialog("update-restarting", {countdown: rounded, os: context.JK.GetOSAsString()});