[Trunk | Library]:
1. searchResearchResults.service.ts & resultLanding.service.ts: Do not stringify null or undefined value for description. 2. claimResultSearchForm.component.ts: Do not stringify null or undefined value for accessRights. git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-library/trunk/ng-openaire-library/src/app@58234 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
parent
0c2258e04d
commit
3045d7afec
|
@ -620,7 +620,7 @@ export class ClaimResultSearchFormComponent {
|
||||||
entity.result.url = prefixUrl + entity.id;
|
entity.result.url = prefixUrl + entity.id;
|
||||||
entity.result.source = String("openaire");
|
entity.result.source = String("openaire");
|
||||||
entity.result.date = (item.year && item.year != "") ? item.year : null;
|
entity.result.date = (item.year && item.year != "") ? item.year : null;
|
||||||
entity.result.accessRights = String(item.title.accessMode);
|
entity.result.accessRights = (item.title && item.title.accessMode) ? String(item.title.accessMode) : "";
|
||||||
|
|
||||||
entity.type = type;
|
entity.type = type;
|
||||||
entity.result.embargoEndDate = (item.embargoEndDate && item.embargoEndDate != "") ? item.embargoEndDate : entity.result.embargoEndDate;
|
entity.result.embargoEndDate = (item.embargoEndDate && item.embargoEndDate != "") ? item.embargoEndDate : entity.result.embargoEndDate;
|
||||||
|
|
|
@ -92,9 +92,11 @@ export class ResultLandingService {
|
||||||
this.resultLandingInfo.dateofacceptance = data[0].dateofacceptance;
|
this.resultLandingInfo.dateofacceptance = data[0].dateofacceptance;
|
||||||
this.resultLandingInfo.publisher = data[0].publisher;
|
this.resultLandingInfo.publisher = data[0].publisher;
|
||||||
if(!Array.isArray(data[0].description)) {
|
if(!Array.isArray(data[0].description)) {
|
||||||
this.resultLandingInfo.description = String(data[0].description);
|
//this.resultLandingInfo.description = String(data[0].description);
|
||||||
|
this.resultLandingInfo.description = (data[0] && data[0].description) ? String(data[0].description) : "";
|
||||||
} else {
|
} else {
|
||||||
this.resultLandingInfo.description = String(data[0].description[0]);
|
//this.resultLandingInfo.description = String(data[0].description[0]);
|
||||||
|
this.resultLandingInfo.description = (data[0] && data[0].description[0]) ? String(data[0].description[0]) : "";
|
||||||
}
|
}
|
||||||
this.resultLandingInfo.embargoEndDate = data[0].embargoenddate;
|
this.resultLandingInfo.embargoEndDate = data[0].embargoenddate;
|
||||||
}
|
}
|
||||||
|
|
|
@ -266,9 +266,9 @@ export class SearchResearchResultsService {
|
||||||
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date;
|
||||||
|
|
||||||
if(!Array.isArray(resData.description)) {
|
if(!Array.isArray(resData.description)) {
|
||||||
result.description = String(resData.description);
|
result.description = (resData.description) ? String(resData.description) : "";
|
||||||
} else {
|
} else {
|
||||||
result.description = String(resData.description[0]);
|
result.description = (resData.description[0]) ? String(resData.description[0]) : "";
|
||||||
}
|
}
|
||||||
|
|
||||||
if(result.description && result.description.length > this.sizeOfDescription) {
|
if(result.description && result.description.length > this.sizeOfDescription) {
|
||||||
|
|
Loading…
Reference in New Issue