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 { func (s *Styles) HasStyle(name string) bool {
var done bool = false var done bool = false
for key := range s.List { if s.List != nil {
if done = key == name; done { _, done = s.List[name]
break
}
} }
return done return done
} }