Skip to content

Commit

Permalink
fix(catalogue): sort of people involved has side effects (#4361)
Browse files Browse the repository at this point in the history
  • Loading branch information
mswertz authored Oct 15, 2024
1 parent ffa3b22 commit 9c16e48
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ const tocItems = computed(() => {
id: "Organisations",
});
}
if (peopleInvolvedSortedByRoleAndName.value) {
if (peopleInvolvedSortedByRoleAndName.value.length > 0) {
tableOffContents.push({
label: "Contributors",
id: "Contributors",
Expand Down Expand Up @@ -509,7 +509,7 @@ if (route.params.catalogue) {
}
const peopleInvolvedSortedByRoleAndName = computed(() =>
resource.value.peopleInvolved?.sort((a, b) => {
[...(resource.value.peopleInvolved ?? [])].sort((a, b) => {
const minimumOrderOfRolesA = a.role?.length
? Math.min(...a.role?.map((role) => role.order ?? Infinity))
: Infinity;
Expand Down Expand Up @@ -599,7 +599,7 @@ const showPopulation = computed(
></ContentBlockOrganisations>
<ContentBlockContact
v-if="peopleInvolvedSortedByRoleAndName"
v-if="peopleInvolvedSortedByRoleAndName.length > 0"
id="Contributors"
title="Contributors"
:contributors="peopleInvolvedSortedByRoleAndName"
Expand Down

0 comments on commit 9c16e48

Please sign in to comment.