Skip to content

Commit

Permalink
🤖 GITHUB ACTIONS format_prettier
Browse files Browse the repository at this point in the history
  • Loading branch information
orcid-releaser committed Oct 2, 2023
1 parent 9ca2721 commit 0a811fc
Showing 1 changed file with 8 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,7 +89,10 @@ export class AffiliationsSortService {

if (by === 'source') {
affiliationGroup.sort((a, b) => {
return Number(AffiliationsSortService.isSelfAsserted(a, orcid)) - Number(AffiliationsSortService.isSelfAsserted(b, orcid))
return (
Number(AffiliationsSortService.isSelfAsserted(a, orcid)) -
Number(AffiliationsSortService.isSelfAsserted(b, orcid))
)
})
if (!ascending) {
affiliationGroup.reverse()
Expand Down Expand Up @@ -203,7 +206,10 @@ export class AffiliationsSortService {
})
}

private static isSelfAsserted(affiliationGroup: AffiliationGroup, orcid: string): boolean {
private static isSelfAsserted(
affiliationGroup: AffiliationGroup,
orcid: string
): boolean {
return affiliationGroup.defaultAffiliation.source === orcid
}
}

0 comments on commit 0a811fc

Please sign in to comment.