mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-11-17 02:31:14 +01:00
fixed table of contributors for changesets without contributors
This commit is contained in:
@@ -66,6 +66,9 @@ const ContributorTable: FC<Props> = ({ changeset }) => {
|
|||||||
const [t] = useTranslation("plugins");
|
const [t] = useTranslation("plugins");
|
||||||
|
|
||||||
const collectAvailableContributorTypes = () => {
|
const collectAvailableContributorTypes = () => {
|
||||||
|
if (!changeset.contributors) {
|
||||||
|
return [];
|
||||||
|
}
|
||||||
// @ts-ignore
|
// @ts-ignore
|
||||||
return [...new Set(changeset.contributors.map(contributor => contributor.type))];
|
return [...new Set(changeset.contributors.map(contributor => contributor.type))];
|
||||||
};
|
};
|
||||||
@@ -97,7 +100,7 @@ const ContributorTable: FC<Props> = ({ changeset }) => {
|
|||||||
<SizedTd>{t("changeset.contributor.type." + contributor.type)}:</SizedTd>
|
<SizedTd>{t("changeset.contributor.type." + contributor.type)}:</SizedTd>
|
||||||
<td className="is-ellipsis-overflow is-marginless">
|
<td className="is-ellipsis-overflow is-marginless">
|
||||||
<CommaSeparatedList>
|
<CommaSeparatedList>
|
||||||
{contributor.persons.map(person => (
|
{contributor.persons!.map(person => (
|
||||||
<Contributor key={person.name} person={person} />
|
<Contributor key={person.name} person={person} />
|
||||||
))}
|
))}
|
||||||
</CommaSeparatedList>
|
</CommaSeparatedList>
|
||||||
|
|||||||
Reference in New Issue
Block a user