Skip to content

Commit

Permalink
fix initial progress stats
Browse files Browse the repository at this point in the history
  • Loading branch information
jmorganca committed Nov 20, 2023
1 parent 433702f commit 8c4022b
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions progress/bar.go
Original file line number Diff line number Diff line change
Expand Up @@ -124,15 +124,14 @@ func (b *Bar) Stats() Stats {

switch {
case b.statted.IsZero():
case b.currentValue >= b.maxValue:
b.stats = Stats{
value: b.maxValue,
value: b.initialValue,
rate: 0,
remaining: 0,
}
case b.statted.IsZero():
case b.currentValue >= b.maxValue:
b.stats = Stats{
value: b.initialValue,
value: b.maxValue,
rate: 0,
remaining: 0,
}
Expand Down

0 comments on commit 8c4022b

Please sign in to comment.