mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-10 22:19:31 +01:00
fix #268
This commit is contained in:
parent
f142bf065d
commit
0751f52f37
@ -340,6 +340,10 @@ func NewModeSet() *ModeSet {
|
||||
|
||||
// test whether `mode` is set
|
||||
func (set *ModeSet) HasMode(mode Mode) bool {
|
||||
if set == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
set.RLock()
|
||||
defer set.RUnlock()
|
||||
return set.modes[mode]
|
||||
|
Loading…
Reference in New Issue
Block a user