do not show NaN

This commit is contained in:
Luc
2021-10-29 14:33:07 +02:00
parent 0a64fe4f20
commit e2ff7e74e4

View File

@@ -1,4 +1,6 @@
const secondsToTimeString = (seconds, daystring = false) => {
if (isNaN(seconds)) return (daystring ? "0 days, " : "") + "00:00:00"
const days = Math.floor(seconds / 86400)
seconds = seconds - days * 86400
const hours = Math.floor(seconds / 3600)