Skip to content

Commit

Permalink
fix: longest time of goal record was not correct, again
Browse files Browse the repository at this point in the history
  • Loading branch information
gwokhov committed Jun 5, 2019
1 parent e84cbe7 commit c458631
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion miniprogram/models/detail.js
Expand Up @@ -49,7 +49,8 @@ class DetailModel {
if (!goalRecords) return durationFormatText(0)
let max = 0
goalRecords.forEach(record => {
max = (record.time > max) ? record.time : max
let time = parseInt(record.time, 10)
max = (time > max) ? time : max
})
return durationFormatText(max)
}
Expand Down

0 comments on commit c458631

Please sign in to comment.