add empty slice check

This commit is contained in:
wanghui 2019-11-20 16:47:24 +08:00
parent a5f79da05e
commit 1c7b332bf0

View File

@ -230,6 +230,10 @@ var clientRetrieveCmd = &cli.Command{
// TODO: parse offer strings from `client find`, make this smarter
if len(offers) < 1 {
fmt.Println("Failed to find file")
return nil
}
order := offers[0].Order()
order.Client = payer