Skip to content

Commit

Permalink
✨ Limit initials length to 3 characters
Browse files Browse the repository at this point in the history
  • Loading branch information
Striffly committed Oct 9, 2023
1 parent dd57bc0 commit 5486fdc
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions src/avatar-image.jsx
Original file line number Diff line number Diff line change
Expand Up @@ -172,6 +172,7 @@ const AvatarImage = createReactClass({
var initials = '';
for(var i=0 ; i < parts.length ; i++)
{
if (i > 3) break;
initials += parts[i].substr(0, 1).toUpperCase();
}
return initials;
Expand Down

0 comments on commit 5486fdc

Please sign in to comment.