Fixes for PR #1654
This commit is contained in:
@@ -757,14 +757,14 @@ function formatTime (time, total) {
|
||||
return '0:00'
|
||||
}
|
||||
|
||||
const totalHours = total / 3600 | 0
|
||||
const totalMinutes = total / 60 | 0
|
||||
const hours = time / 3600 | 0
|
||||
let minutes = time % 3600 / 60 | 0
|
||||
const totalHours = Math.floor(total / 3600)
|
||||
const totalMinutes = Math.floor(total / 60)
|
||||
const hours = Math.floor(time / 3600)
|
||||
let minutes = Math.floor(time % 3600 / 60)
|
||||
if (totalMinutes > 9 && minutes < 10) {
|
||||
minutes = '0' + minutes
|
||||
}
|
||||
const seconds = `0${time % 60 | 0}`.slice(-2)
|
||||
const seconds = `0${Math.floor(time % 60)}`.slice(-2)
|
||||
|
||||
return (totalHours > 0 ? hours + ':' : '') + minutes + ':' + seconds
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user