Use contact's familyName if givenName is empty

This commit is contained in:
Fedor Indutny 2023-08-29 20:57:34 +02:00 committed by GitHub
parent 4ebd9a02c2
commit 1fef0ec208
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23

View file

@ -44,10 +44,14 @@ export function combineNames(
given?: string,
family?: string
): undefined | string {
if (!given) {
if (!given && !family) {
return undefined;
}
if (!given) {
return family;
}
// Users who haven't upgraded to dual-name, or went minimal, will just have a given name
if (!family) {
return given;