fix user profile update
This commit is contained in:
+2
-2
@@ -4,8 +4,8 @@
|
||||
* @param name 头像中显示的用户名
|
||||
* @param backgroundColor 头像背景色
|
||||
*/
|
||||
export function buildFallbackAvatar(name: string, backgroundColor = "#2563eb"): string {
|
||||
const text = encodeURIComponent((name.trim() || "用户").slice(0, 2));
|
||||
export function buildFallbackAvatar(name?: string, backgroundColor = "#2563eb"): string {
|
||||
const text = encodeURIComponent((name?.trim() || "用户").slice(0, 2));
|
||||
const fill = encodeURIComponent(backgroundColor);
|
||||
return [
|
||||
"data:image/svg+xml;charset=UTF-8,",
|
||||
|
||||
Reference in New Issue
Block a user