fix(Avatar): Display special characters in avatar initials
This commit is contained in:
parent
08fb232627
commit
15b677aa2a
|
@ -53,7 +53,7 @@ export function getInitials(s: ?string) {
|
||||||
let initials = '';
|
let initials = '';
|
||||||
|
|
||||||
for (const w of words) {
|
for (const w of words) {
|
||||||
(initials.length < 2) && (initials += w.substr(0, 1).toUpperCase());
|
(initials.length < 2) && (initials += String.fromCodePoint(w.codePointAt(0)).toUpperCase());
|
||||||
}
|
}
|
||||||
|
|
||||||
return initials;
|
return initials;
|
||||||
|
|
Loading…
Reference in New Issue