Skip to content

Commit

Permalink
refactoring: retrun initial filler on base == nil
Browse files Browse the repository at this point in the history
  • Loading branch information
vbauerster committed Aug 26, 2022
1 parent 46fd701 commit a051cdc
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion _examples/barExtenderRev/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ func middleware(base mpb.BarFiller, id uint32) mpb.BarFiller {
}
fmt.Fprintf(w, " Taksk %02d: Done!\n", id)
}
if id == 0 {
if base == nil {
return mpb.BarFillerFunc(fn)
}
return mpb.BarFillerFunc(func(w io.Writer, reqWidth int, st decor.Statistics) {
Expand Down

0 comments on commit a051cdc

Please sign in to comment.