Skip to content

Commit

Permalink
fix(catalogue): resource details page not rendering when resource.peo…
Browse files Browse the repository at this point in the history
…pleInvolved is empty (#4347)
  • Loading branch information
mswertz authored Oct 14, 2024
1 parent 106f0ae commit 005ff2d
Showing 1 changed file with 5 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -287,7 +287,7 @@ const tocItems = computed(() => {
id: "Organisations",
});
}
if (contributors.value) {
if (peopleInvolvedSortedByRoleAndName.value) {
tableOffContents.push({
label: "Contributors",
id: "Contributors",
Expand Down Expand Up @@ -508,8 +508,8 @@ if (route.params.catalogue) {
] = `/${route.params.schema}/ssr-catalogue/all/${resourceType.path}`;
}
const contributors = computed(() =>
resource.value.peopleInvolved.sort((a, b) => {
const peopleInvolvedSortedByRoleAndName = computed(() =>
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,10 +599,10 @@ const showPopulation = computed(
></ContentBlockOrganisations>
<ContentBlockContact
v-if="contributors"
v-if="peopleInvolvedSortedByRoleAndName"
id="Contributors"
title="Contributors"
:contributors="contributors"
:contributors="peopleInvolvedSortedByRoleAndName"
>
</ContentBlockContact>
Expand Down

0 comments on commit 005ff2d

Please sign in to comment.