[skip ci] [Pre] avoid npe

This commit is contained in:
Adlyq
2022-03-23 13:48:21 +08:00
parent 79d984ee8e
commit 9b4ddbed2c
5 changed files with 5 additions and 5 deletions

View File

@ -150,7 +150,7 @@ func (lb *LoadBalance) proxies(touch bool) []C.Proxy {
// MarshalJSON implements C.ProxyAdapter
func (lb *LoadBalance) MarshalJSON() ([]byte, error) {
var all []string
all := []string{}
for _, proxy := range lb.proxies(false) {
all = append(all, proxy.Name())
}