Skip to content

Commit

Permalink
code formatting
Browse files Browse the repository at this point in the history
  • Loading branch information
AJIXuMuK committed Jan 6, 2021
1 parent 5fd8284 commit 36ad1fe
Showing 1 changed file with 4 additions and 2 deletions.
6 changes: 4 additions & 2 deletions src/controls/peoplepicker/PeoplePickerComponent.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -95,13 +95,15 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
for (const userValue of props.defaultSelectedUsers) {
let valueAndTitle: string[] = [];
valueAndTitle.push(userValue);
if (userValue && userValue.indexOf('/') > -1)
if (userValue && userValue.indexOf('/') > -1) {
valueAndTitle = userValue.split('/');
}

const userResult = await this.peopleSearchService.searchPersonByEmailOrLogin(valueAndTitle[0], principalTypes, webAbsoluteUrl, this.groupId, ensureUser);
if (userResult) {
selectedPersons.push(userResult);
}
else if (valueAndTitle.length == 2 && valueAndTitle[1]) { //user not found.. bind the title if exists
else if (valueAndTitle.length === 2 && valueAndTitle[1]) { //user not found.. bind the title if exists
const inactiveUser: IPersonaProps = { text: valueAndTitle[1] };
selectedPersons.push(inactiveUser);
}
Expand Down

0 comments on commit 36ad1fe

Please sign in to comment.