Fix bug in duration format logic (#2026)

This commit is contained in:
Robert Sammelson
2022-12-03 20:31:02 -05:00
committed by GitHub
parent 68ceeb9ea1
commit c4d1569441
2 changed files with 3 additions and 1 deletions
+1 -1
View File
@@ -19,7 +19,7 @@ export const formatDuration = (d) => {
const f = [hours, minutes, seconds]
.map((v) => v.toString())
.map((v) => (v.length !== 2 ? '0' + v : v))
.filter((v, i) => v !== '00' || i > 0)
.filter((v, i) => v !== '00' || i > 0 || days > 0)
.join(':')
return `${days > 0 ? days + ':' : ''}${f}`