Skip to content

Commit

Permalink
Merge pull request #227 from akhuoa/bugfix/dataset-contributor
Browse files Browse the repository at this point in the history
Bugfix for Broken Dataset Page
  • Loading branch information
alan-wu authored Nov 7, 2024
2 parents 940f929 + 813fb99 commit b71627a
Showing 1 changed file with 7 additions and 4 deletions.
11 changes: 7 additions & 4 deletions pages/datasets/[datasetId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,10 +249,13 @@ export default {
getOrganizationIds(algoliaIndex),
getContributorsFromAlgolia(algoliaIndex, datasetId)
])
const datasetDetailsContributors = algoliaContributors?.map(contributor => {
const filteredAlgoliaContributors = algoliaContributors.filter(contributor =>
contributor.first || contributor.last
)
const datasetDetailsContributors = filteredAlgoliaContributors?.map(contributor => {
return {
firstName: contributor.first.name,
lastName: contributor.last.name,
firstName: contributor.first?.name,
lastName: contributor.last?.name,
orcid: contributor.curie?.replace('ORCID:', '')
}
})
Expand All @@ -269,7 +272,7 @@ export default {
name: propOr('', 'organizationName', datasetDetails)
}
]
const contributors = algoliaContributors?.map(contributor => {
const contributors = filteredAlgoliaContributors?.map(contributor => {
const sameAs = contributor.curie
? `http://orcid.org/${contributor.curie.replace('ORCID:', '')}`
: null
Expand Down

0 comments on commit b71627a

Please sign in to comment.