diff --git a/_examples/suppressBar/main.go b/_examples/suppressBar/main.go index fb70f6a..4032e4c 100644 --- a/_examples/suppressBar/main.go +++ b/_examples/suppressBar/main.go @@ -60,10 +60,10 @@ return func(w io.Writer, width int, st *decor.Statistics) { select { case m := <-ch: - if f, ok := filler.(refiller); ok { - defer f.SetRefill(st.Current) - } defer func() { + if f, ok := filler.(refiller); ok { + f.SetRefill(st.Current) + } msg = &m }() nextCh <- struct{}{}