Merge pull request #1546 from mariussharepoint/master

This commit is contained in:
Hugo Bernier 2020-10-12 21:12:17 -04:00 committed by GitHub
commit 0d393f0658
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
2 changed files with 2 additions and 2 deletions

View File

@ -162,7 +162,7 @@ export class ListFormService implements IListFormService {
//Need group lookups
for (let j = 0; j < val.length; j++) {
let y = val[j];
if (y.Key.indexOf("c:0") == 0) {
if (y.Key && y.Key.indexOf("c:0") == 0) {
let res = await searchSvc.resolvePeople(ctx, y.Key, siteUrl);
y.Key = res.Description;
}

View File

@ -5,7 +5,7 @@ import { Link } from 'office-ui-fabric-react/lib/Link';
const SPFieldUserDisplay: React.SFC<ISPFormFieldProps> = (props) => {
if ((props.value) && (props.value.length > 0)) {
const baseUrl = `${props.fieldSchema.ListFormUrl}?PageType=4&ListId=${props.fieldSchema.UserInfoListId}`;
return <div>{props.value.map((val) => <div><Link href={`{baseUrl}&ID=${val.id}`}>{val.title}</Link></div>)}</div>;
return <div>{props.value.map((val) => <div><Link href={`${baseUrl}&ID=${val.id}`}>{val.title}</Link></div>)}</div>;
} else {
return <div></div>;
}