Skip to content

Commit

Permalink
Filter dataset contributors without name
Browse files Browse the repository at this point in the history
  • Loading branch information
akhuoa committed Nov 6, 2024
1 parent 4bbdacb commit 813fb99
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions pages/datasets/[datasetId].vue
Original file line number Diff line number Diff line change
Expand Up @@ -249,7 +249,10 @@ 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,
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 813fb99

Please sign in to comment.