Commit 9c83bd09 authored by Jeromy's avatar Jeromy
Browse files

fix for #757

parent d2544da5
......@@ -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
}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment