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 {
|
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user