fix for #757
This commit is contained in:
parent
d2544da530
commit
9c83bd0959
|
@ -154,10 +154,12 @@ func (pi *PeerInfo) UnmarshalJSON(b []byte) error {
|
|||
return err
|
||||
}
|
||||
pi.ID = pid
|
||||
addrs := data["Addrs"].([]interface{})
|
||||
addrs, ok := data["Addrs"].([]interface{})
|
||||
if ok {
|
||||
for _, a := range addrs {
|
||||
pi.Addrs = append(pi.Addrs, ma.StringCast(a.(string)))
|
||||
}
|
||||
}
|
||||
return nil
|
||||
}
|
||||
|
||||
|
|
Loading…
Reference in New Issue