Revision 58234
Added by Konstantina Galouni over 4 years ago
modules/uoa-services-library/trunk/ng-openaire-library/src/app/services/searchResearchResults.service.ts | ||
---|---|---|
266 | 266 |
result.year = (date && (date).indexOf('-') !== -1)?date.split('-')[0]:date; |
267 | 267 |
|
268 | 268 |
if(!Array.isArray(resData.description)) { |
269 |
result.description = String(resData.description);
|
|
269 |
result.description = (resData.description) ? String(resData.description) : "";
|
|
270 | 270 |
} else { |
271 |
result.description = String(resData.description[0]);
|
|
271 |
result.description = (resData.description[0]) ? String(resData.description[0]) : "";
|
|
272 | 272 |
} |
273 | 273 |
|
274 | 274 |
if(result.description && result.description.length > this.sizeOfDescription) { |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/landingPages/result/resultLanding.service.ts | ||
---|---|---|
92 | 92 |
this.resultLandingInfo.dateofacceptance = data[0].dateofacceptance; |
93 | 93 |
this.resultLandingInfo.publisher = data[0].publisher; |
94 | 94 |
if(!Array.isArray(data[0].description)) { |
95 |
this.resultLandingInfo.description = String(data[0].description); |
|
95 |
//this.resultLandingInfo.description = String(data[0].description); |
|
96 |
this.resultLandingInfo.description = (data[0] && data[0].description) ? String(data[0].description) : ""; |
|
96 | 97 |
} else { |
97 |
this.resultLandingInfo.description = String(data[0].description[0]); |
|
98 |
//this.resultLandingInfo.description = String(data[0].description[0]); |
|
99 |
this.resultLandingInfo.description = (data[0] && data[0].description[0]) ? String(data[0].description[0]) : ""; |
|
98 | 100 |
} |
99 | 101 |
this.resultLandingInfo.embargoEndDate = data[0].embargoenddate; |
100 | 102 |
} |
modules/uoa-services-library/trunk/ng-openaire-library/src/app/claims/claim-utils/claimResultSearchForm.component.ts | ||
---|---|---|
620 | 620 |
entity.result.url = prefixUrl + entity.id; |
621 | 621 |
entity.result.source = String("openaire"); |
622 | 622 |
entity.result.date = (item.year && item.year != "") ? item.year : null; |
623 |
entity.result.accessRights = String(item.title.accessMode);
|
|
623 |
entity.result.accessRights = (item.title && item.title.accessMode) ? String(item.title.accessMode) : "";
|
|
624 | 624 |
|
625 | 625 |
entity.type = type; |
626 | 626 |
entity.result.embargoEndDate = (item.embargoEndDate && item.embargoEndDate != "") ? item.embargoEndDate : entity.result.embargoEndDate; |
Also available in: Unified diff
[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.