fix avatar
This commit is contained in:
parent
51baf30f0d
commit
4657672dfe
1 changed files with 2 additions and 2 deletions
|
|
@ -15,8 +15,8 @@ export const UserAvatar = React.forwardRef<HTMLInputElement, UserAvatarProps>(
|
|||
({ avatarUrl, name, ...props }: UserAvatarProps, ref) => {
|
||||
|
||||
const getInitials = (name: string) => {
|
||||
const names = name.split(' ');
|
||||
return names.slice(0, 2).map(n => n[0]).join('');
|
||||
const names = name?.split(' ');
|
||||
return names?.slice(0, 2).map(n => n[0]).join('');
|
||||
};
|
||||
|
||||
return (
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue