@@ -13,14 +13,14 @@ export function MapRegistryOverview(data: RegistryOverviewData): RegistryOvervie
1313 associatedProject : data . relationships ?. registered_form ?. data ?. id ,
1414 doi : data . attributes ?. doi ,
1515 tags : data . attributes ?. tags ,
16- contributors : data . embeds . bibliographic_contributors . data . map ( ( contributor ) => ( {
17- id : contributor . embeds . users . data . id ,
18- familyName : contributor . embeds . users . data . attributes . family_name ,
19- fullName : contributor . embeds . users . data . attributes . full_name ,
20- givenName : contributor . embeds . users . data . attributes . given_name ,
21- middleName : contributor . embeds . users . data . attributes . middle_names ,
22- type : contributor . embeds . users . data . type ,
16+ contributors : data . embeds ? .bibliographic_contributors ? .data . map ( ( contributor ) => ( {
17+ id : contributor ? .embeds ? .users ? .data ? .id ,
18+ familyName : contributor ? .embeds ? .users ? .data ? .attributes ? .family_name ,
19+ fullName : contributor ? .embeds ? .users ? .data ? .attributes ? .full_name ,
20+ givenName : contributor ? .embeds ? .users ? .data ? .attributes ? .given_name ,
21+ middleName : contributor ? .embeds ? .users ? .data ? .attributes ? .middle_names ,
22+ type : contributor ? .embeds ? .users ? .data ? .type ,
2323 } ) ) ,
24- citation : data . relationships . citation . data . id ,
24+ citation : data . relationships ? .citation ? .data ? .id ,
2525 } as RegistryOverview ;
2626}
0 commit comments