Skip to content

Commit

Permalink
Check length of icons to avoid runtime error when using icons[0] later.
Browse files Browse the repository at this point in the history
  • Loading branch information
aghoulcoder committed Jun 6, 2023
1 parent eddb953 commit 0967925
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion pkg/image/favicon.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,7 @@ func downloadIcon(ctx context.Context, iconPath string, siteURL string) {
}

icons, err := favicon.Find(u.Scheme + "://" + u.Host)
if err != nil {
if err != nil || len(icons) < 1 {
return
}

Expand Down

0 comments on commit 0967925

Please sign in to comment.