[Library | Trunk]: SearchResultService: Add an if condition to check if pid exists on the results
git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58450 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
086a9d045b
commit
2940114ff5
|
@ -169,11 +169,13 @@ export class SearchResearchResultsService {
|
|||
this.parsingFunctions.parseTypes(result.types, types, instance);
|
||||
}
|
||||
/////////////////////////// Athena Code ///////////////////////////
|
||||
for(let i=0; i<resData['pid'].length; i++){
|
||||
if(resData['pid'][i].classid == 'doi'){
|
||||
if(resData['pid'][i].content != '' && resData['pid'][i].content != null){
|
||||
result.DOI = resData['pid'][i].content.replace("https://doi.org/","");
|
||||
break;
|
||||
if(resData['pid']) {
|
||||
for(let i=0; i<resData['pid'].length; i++){
|
||||
if(resData['pid'][i].classid == 'doi'){
|
||||
if(resData['pid'][i].content != '' && resData['pid'][i].content != null){
|
||||
result.DOI = resData['pid'][i].content.replace("https://doi.org/","");
|
||||
break;
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue