Skip to content

Commit 66496cc

Browse files
committed
remove private field
1 parent 6277e44 commit 66496cc

File tree

1 file changed

+2
-4
lines changed

1 file changed

+2
-4
lines changed

src/services/PeopleSearchService.ts

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -13,16 +13,14 @@ import { cloneDeep, findIndex } from "@microsoft/sp-lodash-subset";
1313
export default class SPPeopleSearchService {
1414
private cachedPersonas: { [property: string]: IUserInfo[] };
1515
private cachedLocalUsers: { [siteUrl: string]: IUserInfo[] };
16-
private absoluteWebUrl: string;
1716

1817
/**
1918
* Service constructor
2019
*/
2120
constructor(private context: WebPartContext | ExtensionContext) {
2221
this.cachedPersonas = {};
2322
this.cachedLocalUsers = {};
24-
this.absoluteWebUrl = this.context.pageContext.web.absoluteUrl;
25-
this.cachedLocalUsers[this.absoluteWebUrl] = [];
23+
this.cachedLocalUsers[this.context.pageContext.web.absoluteUrl] = [];
2624
}
2725

2826
/**
@@ -31,7 +29,7 @@ export default class SPPeopleSearchService {
3129
* @param value
3230
*/
3331
public generateUserPhotoLink(value: string): string {
34-
return `${this.absoluteWebUrl}/_layouts/15/userphoto.aspx?accountname=${encodeURIComponent(value)}&size=M`;
32+
return `${this.context.pageContext.web.absoluteUrl}/_layouts/15/userphoto.aspx?accountname=${encodeURIComponent(value)}&size=M`;
3533
}
3634

3735
/**

0 commit comments

Comments
 (0)