amend, ensure styles.List exist first
This commit is contained in:
parent
ee8f40814e
commit
9ff1844932
|
@ -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
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue
Block a user