Merge pull request #435 from hcengineering/fix-433

This commit is contained in:
Andrey Sobolev 2021-11-30 15:58:55 +07:00 committed by GitHub
commit 3840a7d05f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -85,14 +85,14 @@ export function combineName (first: string, last: string): string {
* @public
*/
export function getFirstName (name: string): string {
return name.substring(name.indexOf(SEP) + 1)
return name !== undefined ? name.substring(name.indexOf(SEP) + 1) : ''
}
/**
* @public
*/
export function getLastName (name: string): string {
return name.substring(0, name.indexOf(SEP))
return name !== undefined ? name.substring(0, name.indexOf(SEP)) : ''
}
/**