mirror of
https://framagit.org/framasoft/mobilizon.git
synced 2024-12-30 11:55:26 +00:00
Make sure we can call displayName with eventually undefined actor
Signed-off-by: Thomas Citharel <tcit@tcit.fr>
This commit is contained in:
parent
c216172d44
commit
79872b47df
1 changed files with 1 additions and 1 deletions
|
@ -68,7 +68,7 @@ export function usernameWithDomain(actor: IActor, force = false): string {
|
|||
}
|
||||
|
||||
export function displayName(actor: IActor): string {
|
||||
return actor.name != null && actor.name !== ""
|
||||
return actor && actor.name != null && actor.name !== ""
|
||||
? actor.name
|
||||
: usernameWithDomain(actor);
|
||||
}
|
||||
|
|
Loading…
Reference in a new issue