mirror of
https://github.com/docmost/docmost.git
synced 2025-11-12 16:12:39 +10:00
fix avatar
This commit is contained in:
@ -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 (
|
||||
|
||||
Reference in New Issue
Block a user