Skip to content

Commit

Permalink
Fixed directImageURL incase the image is not in an album
Browse files Browse the repository at this point in the history
  • Loading branch information
jbreitbart committed Apr 13, 2020
1 parent c25ab65 commit 79e7913
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion fromURL.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ func (client *Client) directImageURL(url string) (*GenericInfo, int, error) {
id := url[start:end]
client.Log.Debugf("Detected imgur image ID %v. Was going down the i.imgur.com/ path.", id)
gii, status, err := client.GetGalleryImageInfo(id)
if status < 400 {
if err == nil && status < 400 {
ret.GImage = gii
} else {
var ii *ImageInfo
Expand Down

0 comments on commit 79e7913

Please # to comment.