Skip to content

Commit

Permalink
More robust avatar finder
Browse files Browse the repository at this point in the history
  • Loading branch information
Chocobozzz committed Feb 16, 2024
1 parent 48f1d4b commit cb23087
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion client/src/app/helpers/utils/channel.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,5 +40,5 @@ export {
function getAvatarPath (c: VideoChannel) {
if (!c.avatars || c.avatars.length === 0) return undefined

return minBy(c.avatars, 'width').path
return minBy(c.avatars, 'width')?.path || c.avatars[0].path
}

0 comments on commit cb23087

Please sign in to comment.