fix missing hours if days in formatTime

This commit is contained in:
Cynthia Foxwell 2025-03-11 13:06:49 -06:00
parent 7b2c6e110a
commit 80b24a916c
Signed by: Cynosphere
SSH key fingerprint: SHA256:H3SM8ufP/uxqLwKSH7xY89TDnbR9uOHzjLoBr0tlajk

View file

@ -9,7 +9,7 @@ function formatTime(number) {
return (
(days !== 0 ? `${days.toString().padStart(2, "0")}:` : "") +
(hours !== 0 ? `${hours.toString().padStart(2, "0")}:` : "") +
(days !== 0 && hours !== 0 ? `${hours.toString().padStart(2, "0")}:` : "") +
`${minutes.toString().padStart(2, "0")}:${seconds.toString().padStart(2, "0")}`
);
}