diff options
Diffstat (limited to 'client/src/app/shared/actor')
-rw-r--r-- | client/src/app/shared/actor/actor.model.ts | 10 |
1 files changed, 7 insertions, 3 deletions
diff --git a/client/src/app/shared/actor/actor.model.ts b/client/src/app/shared/actor/actor.model.ts index 0e5060f67..a78303a2f 100644 --- a/client/src/app/shared/actor/actor.model.ts +++ b/client/src/app/shared/actor/actor.model.ts | |||
@@ -15,10 +15,14 @@ export abstract class Actor implements ActorServer { | |||
15 | 15 | ||
16 | avatarUrl: string | 16 | avatarUrl: string |
17 | 17 | ||
18 | static GET_ACTOR_AVATAR_URL (actor: { avatar?: { path: string } }) { | 18 | static GET_ACTOR_AVATAR_URL (actor: { avatar?: Avatar }) { |
19 | const absoluteAPIUrl = getAbsoluteAPIUrl() | 19 | if (actor?.avatar?.url) return actor.avatar.url |
20 | |||
21 | if (actor && actor.avatar) { | ||
22 | const absoluteAPIUrl = getAbsoluteAPIUrl() | ||
20 | 23 | ||
21 | if (actor && actor.avatar) return absoluteAPIUrl + actor.avatar.path | 24 | return absoluteAPIUrl + actor.avatar.path |
25 | } | ||
22 | 26 | ||
23 | return this.GET_DEFAULT_AVATAR_URL() | 27 | return this.GET_DEFAULT_AVATAR_URL() |
24 | } | 28 | } |