Skip to content

Commit

Permalink
null avatars
Browse files Browse the repository at this point in the history
  • Loading branch information
kentcdodds committed Oct 18, 2023
1 parent 0f42ddc commit 99ddfb1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions app/routes/resources.connect-epic-web.ts
Original file line number Diff line number Diff line change
Expand Up @@ -135,6 +135,7 @@ async function getAvatarUrl(id: string) {
},
)
const data = (await res.json()) as any
if (!data.user.avatar) return null
return `https://cdn.discordapp.com/avatars/${id}/${data.user.avatar}?size=512`
} catch {
return null
Expand Down
1 change: 1 addition & 0 deletions app/routes/resources.epic-web-forum.ts
Original file line number Diff line number Diff line change
Expand Up @@ -225,6 +225,7 @@ async function getAvatarUrl(id: string) {
},
)
const data = (await res.json()) as any
if (!data.user.avatar) return null
return `https://cdn.discordapp.com/avatars/${id}/${data.user.avatar}?size=128`
} catch {
return null
Expand Down

0 comments on commit 99ddfb1

Please sign in to comment.