fix: return handle if no jCard

This commit is contained in:
Maël Gangloff 2024-08-21 16:32:23 +02:00
parent 997d247a39
commit 2ac1ae1a4c
No known key found for this signature in database
GPG Key ID: 11FDC81C24A7F629
2 changed files with 5 additions and 3 deletions

View File

@ -69,6 +69,8 @@ export const actionToIcon = (a: EventAction) => a === 'registration' ?
export const entityToName = (e: { entity: Entity }): string => { export const entityToName = (e: { entity: Entity }): string => {
if (e.entity.jCard.length === 0) return e.entity.handle
const jCard = vCard.fromJSON(e.entity.jCard) const jCard = vCard.fromJSON(e.entity.jCard)
let name = e.entity.handle let name = e.entity.handle
if (jCard.data.fn && !Array.isArray(jCard.data.fn) && jCard.data.fn.valueOf() !== '') name = jCard.data.fn.valueOf() if (jCard.data.fn && !Array.isArray(jCard.data.fn) && jCard.data.fn.valueOf() !== '') name = jCard.data.fn.valueOf()

View File

@ -943,13 +943,13 @@ msgid ""
"another" "another"
msgstr "" msgstr ""
#: assets/utils/index.tsx:101 #: assets/utils/index.tsx:103
#, javascript-format #, javascript-format
msgid "Please retry after ${ duration } seconds" msgid "Please retry after ${ duration } seconds"
msgstr "" msgstr ""
#: assets/utils/index.tsx:105 #: assets/utils/index.tsx:107
#: assets/utils/index.tsx:108 #: assets/utils/index.tsx:110
msgid "An error occurred" msgid "An error occurred"
msgstr "" msgstr ""