aboutsummaryrefslogtreecommitdiffhomepage
path: root/client/src/app/shared/shared-main
diff options
context:
space:
mode:
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