diff --git a/bar_option.go b/bar_option.go index 5319649..d938e41 100644 --- a/bar_option.go +++ b/bar_option.go @@ -175,10 +175,10 @@ // SpinnerStyle sets custom spinner style. // Effective when Filler type is spinner. func SpinnerStyle(frames []string) BarOption { + if len(frames) == 0 { + return nil + } chk := func(filler Filler) (interface{}, bool) { - if len(frames) == 0 { - return nil, false - } t, ok := filler.(*spinnerFiller) return t, ok }