Skip to content

Commit 274af2c

Browse files
authored
fix: prevent undefined in people-picker option labels for line two (#2211)
1 parent 711a233 commit 274af2c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

packages/mgt-components/src/components/mgt-people-picker/mgt-people-picker.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -950,7 +950,7 @@ export class MgtPeoplePicker extends MgtTemplatedComponent {
950950
person => person.id,
951951
person => {
952952
const lineTwo = person.jobTitle || (person as User).mail;
953-
const ariaLabel = `${this.strings.suggestedContact} ${person.displayName} ${lineTwo}`;
953+
const ariaLabel = `${this.strings.suggestedContact} ${person.displayName} ${lineTwo ?? ''}`;
954954
return html`
955955
<li
956956
id="${person.id}"

0 commit comments

Comments
 (0)