fixed error without contributors

This commit is contained in:
Sebastian Sdorra
2020-06-11 08:08:47 +02:00
parent ce2212d41f
commit 9d6621ca51
3 changed files with 11 additions and 3 deletions

View File

@@ -128,6 +128,8 @@ const Contributors: FC<PersonsProps> = ({ persons, label, displayTextOnly }) =>
}
};
const emptyListOfContributors: Person[] = [];
const ChangesetAuthor: FC<Props> = ({ changeset }) => {
const binder = useBinder();
@@ -140,7 +142,10 @@ const ChangesetAuthor: FC<Props> = ({ changeset }) => {
};
const filterContributorsByType = (type: string) => {
return changeset.contributors.filter(p => p.type === type).map(contributor => contributor.person);
if (changeset.contributors) {
return changeset.contributors.filter(p => p.type === type).map(contributor => contributor.person);
}
return emptyListOfContributors;
};
const authorLine = [];