浏览代码

fix(Avatar): Display special characters in avatar initials

factor2
Vlad Piersec 3 年前
父节点
当前提交
15b677aa2a
共有 1 个文件被更改,包括 1 次插入1 次删除
  1. 1
    1
      react/features/base/avatar/functions.js

+ 1
- 1
react/features/base/avatar/functions.js 查看文件

@@ -53,7 +53,7 @@ export function getInitials(s: ?string) {
53 53
     let initials = '';
54 54
 
55 55
     for (const w of words) {
56
-        (initials.length < 2) && (initials += w.substr(0, 1).toUpperCase());
56
+        (initials.length < 2) && (initials += String.fromCodePoint(w.codePointAt(0)).toUpperCase());
57 57
     }
58 58
 
59 59
     return initials;

正在加载...
取消
保存