mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-09 23:15:43 +01:00
fixed error without contributors
This commit is contained in:
@@ -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 = [];
|
||||
|
||||
Reference in New Issue
Block a user