fix: handle undefined displayName (#21)

This commit is contained in:
patak 2022-11-21 16:07:55 +01:00 committed by GitHub
parent 2ef2e97a30
commit f7f3e9c7e1
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 16 additions and 9 deletions

5
composables/masto.ts Normal file
View file

@ -0,0 +1,5 @@
import type { Account } from 'masto'
export function getDisplayName(account: Account) {
return account.displayName || account.username
}