File tree Expand file tree Collapse file tree 2 files changed +1
-5
lines changed
Expand file tree Collapse file tree 2 files changed +1
-5
lines changed Original file line number Diff line number Diff line change @@ -42,10 +42,6 @@ const avatarRef = useTemplateRef<HTMLDivElement>("avatar");
4242const labelFirstLetters = computed (() => {
4343 if (! props .label ) return " " ;
4444
45- if (! props .label .includes (" " )) {
46- return props .label ;
47- }
48-
4945 const [firstWord, secondWord] = props .label .split (" " );
5046
5147 const firstWordLetter = firstWord ? firstWord [0 ].toUpperCase () : " " ;
Original file line number Diff line number Diff line change @@ -26,7 +26,7 @@ describe("UAvatar.vue", () => {
2626 // Label prop with a single word
2727 it ( "displays only first letter when label has only one word" , ( ) => {
2828 const label = "John" ;
29- const expectedText = "John " ;
29+ const expectedText = "J " ;
3030
3131 const component = mount ( UAvatar , {
3232 props : {
You can’t perform that action at this time.
0 commit comments