aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
authorChocobozzz <me@florianbigard.com>2023-03-02 10:16:21 +0100
committerChocobozzz <me@florianbigard.com>2023-03-02 10:16:21 +0100
commite2d8587bd36239f0ba0be59a9185682072a392fc (patch)
tree989a41aee770f9d561b1ca9a6b2281b1a4022c23 /client/src/app/shared/shared-main
parent2c8380a46f34631e705b1564938343cacfa4b0bc (diff)
downloadPeerTube-e2d8587bd36239f0ba0be59a9185682072a392fc.tar.gz
PeerTube-e2d8587bd36239f0ba0be59a9185682072a392fc.tar.zst
PeerTube-e2d8587bd36239f0ba0be59a9185682072a392fc.zip
Fix displaying remote actor avatars
Diffstat (limited to 'client/src/app/shared/shared-main')
-rw-r--r--client/src/app/shared/shared-main/account/actor.model.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/client/src/app/shared/shared-main/account/actor.model.ts b/client/src/app/shared/shared-main/account/actor.model.ts
index 6e45ba588..77bf9171b 100644
--- a/client/src/app/shared/shared-main/account/actor.model.ts
+++ b/client/src/app/shared/shared-main/account/actor.model.ts
@@ -23,7 +23,7 @@ export abstract class Actor implements ServerActor {
23 static GET_ACTOR_AVATAR_URL (actor: { avatars: { width: number, url?: string, path: string }[] }, size?: number) { 23 static GET_ACTOR_AVATAR_URL (actor: { avatars: { width: number, url?: string, path: string }[] }, size?: number) {
24 const avatarsAscWidth = actor.avatars.sort((a, b) => a.width - b.width) 24 const avatarsAscWidth = actor.avatars.sort((a, b) => a.width - b.width)
25 25
26 const avatar = size 26 const avatar = size && avatarsAscWidth.length > 1
27 ? avatarsAscWidth.find(a => a.width >= size) 27 ? avatarsAscWidth.find(a => a.width >= size)
28 : avatarsAscWidth[avatarsAscWidth.length - 1] // Bigger one 28 : avatarsAscWidth[avatarsAscWidth.length - 1] // Bigger one
29 29