mirror of
https://github.com/pi-hole/web.git
synced 2025-12-24 20:55:28 +00:00
Start count down only if there is something to count down
This commit is contained in:
@@ -91,8 +91,11 @@ function piholeChange(action, duration)
|
||||
if(data.status === "disabled") {
|
||||
btnStatus.html("");
|
||||
piholeChanged("disabled");
|
||||
enaT.html(new Date().getTime() + duration * 1000);
|
||||
setTimeout(countDown,100);
|
||||
if(duration > 0)
|
||||
{
|
||||
enaT.html(new Date().getTime() + duration * 1000);
|
||||
setTimeout(countDown,100);
|
||||
}
|
||||
}
|
||||
});
|
||||
break;
|
||||
|
||||
Reference in New Issue
Block a user