Skip to content

Commit

Permalink
fix duplicate personal names crossref
Browse files Browse the repository at this point in the history
  • Loading branch information
mfenner committed Apr 22, 2024
1 parent 4e1b935 commit 8b98858
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion crossref/crossref.go
Original file line number Diff line number Diff line change
Expand Up @@ -412,7 +412,7 @@ func ReadCrossref(content Content) (types.Data, error) {
Affiliations: affiliations,
}
containsName := slices.ContainsFunc(data.Contributors, func(e types.Contributor) bool {
return e.Name != "" && e.Name == contributor.Name
return e.Name != "" && e.Name == contributor.Name || e.GivenName != "" && e.GivenName == contributor.GivenName && e.FamilyName != "" && e.FamilyName == contributor.FamilyName
})
if !containsName {
data.Contributors = append(data.Contributors, contributor)
Expand Down

0 comments on commit 8b98858

Please sign in to comment.