amend, ensure styles.List exist first

This commit is contained in:
Mahdi Abu Yasmine 2023-11-04 18:44:35 +01:00
parent ee8f40814e
commit 9ff1844932

View File

@ -84,10 +84,8 @@ func NewStyles() *Styles {
func (s *Styles) HasStyle(name string) bool {
var done bool = false
for key := range s.List {
if done = key == name; done {
break
}
if s.List != nil {
_, done = s.List[name]
}
return done
}