mirror of
https://github.com/unpoller/unpoller.git
synced 2026-10-18 22:40:03 +02:00
change the order for which we check these to avoid a NPE
This commit is contained in:
@@ -194,7 +194,10 @@ func (u *DatadogUnifi) Enabled() bool {
|
||||
if u == nil {
|
||||
return false
|
||||
}
|
||||
if u.Enable == nil || u.Config == nil {
|
||||
if u.Config == nil {
|
||||
return false
|
||||
}
|
||||
if u.Enable == nil {
|
||||
return false
|
||||
}
|
||||
return *u.Enable
|
||||
|
||||
Reference in New Issue
Block a user