mirror of
https://github.com/hcengineering/platform.git
synced 2024-11-23 22:12:44 +03:00
#433 workaround (avoid crash)
Signed-off-by: Andrey Platov <andrey@hardcoreeng.com>
This commit is contained in:
parent
f052c985f6
commit
dd20149a2c
@ -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)) : ''
|
||||
}
|
||||
|
||||
/**
|
||||
|
Loading…
Reference in New Issue
Block a user