File tree Expand file tree Collapse file tree 1 file changed +13
-11
lines changed
packages/mgt-components/src/components/mgt-person-card Expand file tree Collapse file tree 1 file changed +13
-11
lines changed Original file line number Diff line number Diff line change @@ -661,20 +661,22 @@ export class MgtPersonCard extends MgtTemplatedTaskComponent implements IHistory
661661 }
662662
663663 // Video
664-
665- ariaLabel = `${ this . strings . videoButtonLabel } ${ person . displayName } ` ;
666- const video : TemplateResult = html `
667- < fluent-button class ="icon "
668- aria-label =${ ariaLabel }
669- @click =${ this . videoCallUser } >
670- ${ getSvg ( SvgIcon . Video ) }
671- </ fluent-button >
672- ` ;
664+ let video : TemplateResult ;
665+ if ( userPerson ?. userPrincipalName ) {
666+ ariaLabel = `${ this . strings . videoButtonLabel } ${ person . displayName } ` ;
667+ video = html `
668+ < fluent-button class ="icon "
669+ aria-label =${ ariaLabel }
670+ @click =${ this . videoCallUser } >
671+ ${ getSvg ( SvgIcon . Video ) }
672+ </ fluent-button >
673+ ` ;
674+ }
673675
674676 // Call
675677 let call : TemplateResult ;
676- if ( userPerson . userPrincipalName ) {
677- ariaLabel = `${ this . strings . callButtonLabel } ${ person . displayName } ` ;
678+ if ( this . hasPhone ) {
679+ ariaLabel = `${ this . strings . callButtonLabel } ${ userPerson . displayName } ` ;
678680 call = html `
679681 < fluent-button class ="icon "
680682 aria-label =${ ariaLabel }
You can’t perform that action at this time.
0 commit comments