File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -229,7 +229,8 @@ export default class SPPeopleSearchService {
229
229
switch ( element . EntityType ) {
230
230
case 'User' :
231
231
let email : string = element . EntityData . Email !== null ? element . EntityData . Email : element . Description ;
232
- const accountName = this . getAccountName ( element ) ;
232
+ // Description contains the account name for a user
233
+ const accountName = element . Description || this . getAccountName ( element ) ;
233
234
return {
234
235
id : element . Key ,
235
236
loginName : element . LoginName ? element . LoginName : element . Key ,
@@ -311,7 +312,7 @@ export default class SPPeopleSearchService {
311
312
}
312
313
313
314
/**
314
- * Gets account name for user, falls back to description
315
+ * Gets account name for user
315
316
*/
316
317
private getAccountName ( element : any ) : string {
317
318
if ( ! element ) { return "" ; }
@@ -320,7 +321,8 @@ export default class SPPeopleSearchService {
320
321
const loginParts : string [ ] = loginName . split ( "|" ) ;
321
322
return loginParts [ loginParts . length - 1 ] ;
322
323
}
323
- return element . Description || "" ;
324
+
325
+ return "" ;
324
326
}
325
327
326
328
/**
You can’t perform that action at this time.
0 commit comments