add one more check for the imported data

git-svn-id: https://svn.driver.research-infrastructures.eu/driver/dnet40/modules/uoa-services-portal/trunk@46353 d315682c-612b-4755-9ff5-7f18f6832af3
This commit is contained in:
argiro.kokogiannaki 2017-03-20 11:06:44 +00:00
parent d19c45c193
commit 88c3173d54
1 changed files with 10 additions and 8 deletions

View File

@ -65,6 +65,7 @@ export class CiteThisComponent {
if(this.result.publisher){ if(this.result.publisher){
citationData.publisher = this.result.publisher; citationData.publisher = this.result.publisher;
} }
if( this.result.authors){
citationData.author = []; citationData.author = [];
for (var i =0 ;i < this.result.authors.length; i++){ for (var i =0 ;i < this.result.authors.length; i++){
if(this.result.authors[i].name && this.result.authors[i].name.indexOf(", ") !== -1){ if(this.result.authors[i].name && this.result.authors[i].name.indexOf(", ") !== -1){
@ -74,6 +75,7 @@ export class CiteThisComponent {
} }
citationData.authors.push(this.result.authors[i].name); citationData.authors.push(this.result.authors[i].name);
} }
}
if(this.result.dateofacceptance != undefined){ if(this.result.dateofacceptance != undefined){
citationData.issued = []; citationData.issued = [];
//[this.result.dateofacceptance.substring(0,4),this.result.dateofacceptance.substring(5,7),this.result.dateofacceptance.substring(8,10)] //[this.result.dateofacceptance.substring(0,4),this.result.dateofacceptance.substring(5,7),this.result.dateofacceptance.substring(8,10)]