]> Untitled Git - lemmy-ui.git/commitdiff
chore: in case display_name not exist
authorOwen Young <theowenyoung@gmail.com>
Fri, 29 Oct 2021 04:29:45 +0000 (12:29 +0800)
committerOwen Young <theowenyoung@gmail.com>
Fri, 29 Oct 2021 04:29:45 +0000 (12:29 +0800)
src/shared/utils.ts

index d8643c3fc3860271ba247ebcce54b14294d06411..a383b48949eded8d79f86ec4eabc06191503eed0 100644 (file)
@@ -1468,7 +1468,7 @@ export function communitySelectName(cv: CommunityView): string {
 
 export function personSelectName(pvs: PersonViewSafe): string {
   return pvs.person.local
-    ? pvs.person.display_name
+    ? pvs.person.display_name || pvs.person.name
     : `${hostname(pvs.person.actor_id)}/${pvs.person.name}`;
 }