Skip to content

Commit 0bf3aac

Browse files
committed
fix: fix support of unicode characters in DefaultAvatar component
(cherry picked from commit 24fcdc9)
1 parent 2d0f4c5 commit 0bf3aac

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/misc/DefaultAvatar/DefaultAvatar.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,7 @@ const useStyles = makeStyles((theme) => ({
3131

3232
export const DefaultAvatar = ({ userName, size, variant }) => {
3333
const avatarBackgroundColor = stringToColor(userName);
34-
const letter = userName.charAt(0).toUpperCase();
34+
const letter = String.fromCodePoint(userName.codePointAt(0)).toUpperCase();
3535

3636
const classes = useStyles({ avatarBackgroundColor, size });
3737

0 commit comments

Comments
 (0)