We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 75ba91e commit 037a038Copy full SHA for 037a038
packages/uui-avatar/lib/uui-avatar.element.ts
@@ -71,8 +71,8 @@ export class UUIAvatarElement extends LitElement {
71
return initials;
72
}
73
74
- const words = name.match(/(\w+)/g);
75
-
+ const matches = [...name.matchAll(/(?:^|\s)(.)/g)];
+ const words = matches.map(m => m[1]).join('');
76
if (!words?.length) {
77
78
0 commit comments