fixed some base cases

This commit is contained in:
2020-06-09 14:41:49 -05:00
parent 968d670b29
commit 6e3297df4f

View File

@@ -115,6 +115,9 @@ func get_image(sub string) <-chan string {
return
}
// nothing found
ret <- ""
}()
return ret
@@ -260,7 +263,7 @@ func get_subreddit_image(sub string) <-chan string {
if hint == "image" || hint == "link" || hint == "rich:video" {
image, _ := jsonparser.GetString(out, "data", "children", "[" + strconv.Itoa(random_img) + "]", "data", "url")
ret <- image
break
return
}
}
}()