Skip to content

Commit 1c6f051

Browse files
committed
#236 - small code updates
1 parent 46fd001 commit 1c6f051

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

src/controls/peoplepicker/PeoplePickerComponent.tsx

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -67,10 +67,10 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
6767
* Get initial persons
6868
*/
6969
private async getInitialPersons(props: IPeoplePickerProps) {
70-
const { groupName } = props;
70+
const { groupName, webAbsoluteUrl, defaultSelectedUsers, ensureUser, principalTypes } = props;
7171
// Check if a group property was provided, and get the group ID
7272
if (groupName) {
73-
this.groupId = await this.peopleSearchService.getGroupId(props.groupName, props.webAbsoluteUrl);
73+
this.groupId = await this.peopleSearchService.getGroupId(groupName, webAbsoluteUrl);
7474
if (!this.groupId) {
7575
this.setState({
7676
errorMessage: "Group could not be found."
@@ -82,10 +82,10 @@ export class PeoplePicker extends React.Component<IPeoplePickerProps, IPeoplePic
8282
}
8383

8484
// Check for default user values
85-
if (props.defaultSelectedUsers) {
85+
if (defaultSelectedUsers) {
8686
let selectedPersons: IPersonaProps[] = [];
8787
for (const userValue of props.defaultSelectedUsers) {
88-
const userResult = await this.peopleSearchService.searchPersonByEmailOrLogin(userValue, props.principalTypes, props.webAbsoluteUrl, this.groupId, props.ensureUser);
88+
const userResult = await this.peopleSearchService.searchPersonByEmailOrLogin(userValue, principalTypes, webAbsoluteUrl, this.groupId, ensureUser);
8989
if (userResult) {
9090
selectedPersons.push(userResult);
9191
}

0 commit comments

Comments
 (0)