@@ -312,6 +312,7 @@ export class MgtPerson extends MgtTemplatedComponent {
312312 this . personDetails && this . personCardInteraction === PersonCardInteraction . none
313313 ? this . personDetails . displayName
314314 : '' ;
315+
315316 const isLarge = this . showEmail && this . showName ;
316317 const imageClasses = {
317318 initials : ! imageSrc ,
@@ -321,19 +322,31 @@ export class MgtPerson extends MgtTemplatedComponent {
321322 } ;
322323
323324 let imageHtml : TemplateResult ;
325+
324326 if ( imageSrc ) {
325327 // render the image
326328 imageHtml = html `
327329 < img alt =${ title } src =${ imageSrc } />
328330 ` ;
329331 } else if ( this . personDetails ) {
330- // render the initials
331- const initials = this . getInitials ( this . personDetails ) ;
332+ // render the initials or person icon
333+
332334 // add avatar background color
333335 imageClasses [ this . _personAvatarBg ] = true ;
336+
337+ const initials = this . getInitials ( this . personDetails ) ;
338+ const initialsHtml =
339+ initials && initials . length
340+ ? html `
341+ ${ initials }
342+ `
343+ : html `
344+ < i class ="ms-Icon ms-Icon--Contact "> </ i >
345+ ` ;
346+
334347 imageHtml = html `
335348 < span class ="initials-text " aria-label ="${ initials } ">
336- ${ initials }
349+ ${ initialsHtml }
337350 </ span >
338351 ` ;
339352 } else {
@@ -572,7 +585,7 @@ export class MgtPerson extends MgtTemplatedComponent {
572585 if ( ! initials && person . displayName ) {
573586 const name = person . displayName . split ( / \s + / ) ;
574587 for ( let i = 0 ; i < 2 && i < name . length ; i ++ ) {
575- if ( name [ i ] [ 0 ] && name [ i ] [ 0 ] . match ( / [ a - z ] / i ) ) {
588+ if ( name [ i ] [ 0 ] && name [ i ] [ 0 ] . match ( / \p { L } / gu ) ) {
576589 // check if letter
577590 initials += name [ i ] [ 0 ] . toUpperCase ( ) ;
578591 }
0 commit comments