Skip to content

Commit 15ba724

Browse files
authored
Check in case affiliation does not have identifier field (#2411)
1 parent df01773 commit 15ba724

File tree

1 file changed

+8
-3
lines changed
  • app/institutions/dashboard/-components/object-list/contributors-field

1 file changed

+8
-3
lines changed

app/institutions/dashboard/-components/object-list/contributors-field/component.ts

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -64,9 +64,14 @@ function hasInstitutionAffiliation(contributors: any[], attribution: any, instit
6464
}
6565

6666
return attributedContributor.affiliation.some(
67-
(affiliation: any) => affiliation.identifier.some(
68-
(affiliationIdentifier: any) => institutionIris.includes(affiliationIdentifier['@value']),
69-
),
67+
(affiliation: any) => {
68+
if (affiliation.identifier) {
69+
return affiliation.identifier.some(
70+
(affiliationIdentifier: any) => institutionIris.includes(affiliationIdentifier['@value']),
71+
);
72+
}
73+
return institutionIris.includes(affiliation['@id']);
74+
},
7075
);
7176
}
7277

0 commit comments

Comments
 (0)