Use contact's familyName if givenName is empty
This commit is contained in:
parent
4ebd9a02c2
commit
1fef0ec208
1 changed files with 5 additions and 1 deletions
|
@ -44,10 +44,14 @@ export function combineNames(
|
||||||
given?: string,
|
given?: string,
|
||||||
family?: string
|
family?: string
|
||||||
): undefined | string {
|
): undefined | string {
|
||||||
if (!given) {
|
if (!given && !family) {
|
||||||
return undefined;
|
return undefined;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (!given) {
|
||||||
|
return family;
|
||||||
|
}
|
||||||
|
|
||||||
// Users who haven't upgraded to dual-name, or went minimal, will just have a given name
|
// Users who haven't upgraded to dual-name, or went minimal, will just have a given name
|
||||||
if (!family) {
|
if (!family) {
|
||||||
return given;
|
return given;
|
||||||
|
|
Loading…
Reference in a new issue