Skip to content

Commit

Permalink
repo-avatars - Fix wrong organization avatar (#7324)
Browse files Browse the repository at this point in the history
  • Loading branch information
LitoMore committed Apr 7, 2024
1 parent ac33bfd commit f8ea50b
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion source/github-helpers/get-user-avatar.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,8 @@ export default function getUserAvatar(username: string, size: number): string |
const cleanName = username.replace('[bot]', '');

// Find image on page. Saves a request and a redirect + add support for bots
const existingAvatar = $(`img[alt="@${cleanName}"]`);
const existingAvatar = $(`[href="/${cleanName}" i] img`);

if (existingAvatar) {
return existingAvatar.src;
}
Expand Down

0 comments on commit f8ea50b

Please sign in to comment.