#433 workaround (avoid crash)

Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
Andrey Platov 2021-11-30 09:46:53 +01:00
parent f052c985f6
commit dd20149a2c
No known key found for this signature in database
GPG Key ID: C8787EFEB4B64AF0

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)) : ''
}
/**