mirror of https://github.com/Chocobozzz/PeerTube
More robust avatar finder
parent
48f1d4b186
commit
cb23087ff5
|
@ -40,5 +40,5 @@ export {
|
||||||
function getAvatarPath (c: VideoChannel) {
|
function getAvatarPath (c: VideoChannel) {
|
||||||
if (!c.avatars || c.avatars.length === 0) return undefined
|
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
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue