More robust avatar finder

pull/6252/head
Chocobozzz 2024-02-16 10:24:02 +01:00
parent 48f1d4b186
commit cb23087ff5
No known key found for this signature in database
GPG Key ID: 583A612D890159BE
1 changed files with 1 additions and 1 deletions

View File

@ -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
}