aboutsummaryrefslogtreecommitdiffhomepage
path: root/client
diff options
context:
space:
mode:
Diffstat (limited to 'client')
-rw-r--r--client/src/app/shared/shared-main/account/actor.model.ts6
1 files changed, 3 insertions, 3 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 6be6b75d0..6e45ba588 100644
--- a/client/src/app/shared/shared-main/account/actor.model.ts
+++ b/client/src/app/shared/shared-main/account/actor.model.ts
@@ -21,11 +21,11 @@ export abstract class Actor implements ServerActor {
21 isLocal: boolean 21 isLocal: boolean
22 22
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 avatars = actor.avatars.sort((a, b) => b.width - a.width) 24 const avatarsAscWidth = actor.avatars.sort((a, b) => a.width - b.width)
25 25
26 const avatar = size 26 const avatar = size
27 ? avatars.find(a => a.width >= size) 27 ? avatarsAscWidth.find(a => a.width >= size)
28 : avatars[0] 28 : avatarsAscWidth[avatarsAscWidth.length - 1] // Bigger one
29 29
30 if (!avatar) return '' 30 if (!avatar) return ''
31 if (avatar.url) return avatar.url 31 if (avatar.url) return avatar.url