diff --git a/src/frontend/app/administration/contact/list/import/contact-import.component.ts b/src/frontend/app/administration/contact/list/import/contact-import.component.ts index 874cc89556ca86b4da1e9f313a3859dc85f88f38..dfc0a32ce9d9f9e70651b2c65a0dcce6abd1f77b 100644 --- a/src/frontend/app/administration/contact/list/import/contact-import.component.ts +++ b/src/frontend/app/administration/contact/list/import/contact-import.component.ts @@ -309,10 +309,14 @@ export class ContactImportComponent implements OnInit { if ((this.hasHeader && index > 0) || !this.hasHeader) { const objContact = {}; this.contactColumns.forEach((key) => { - if (key.emptyValueMode && this.functionsService.empty(element[this.associatedColmuns[key.id]])) { + if (key.emptyValueMode && (element[this.associatedColmuns[key.id]] === undefined || this.functionsService.empty(element[this.associatedColmuns[key.id]]))) { objContact[key.id] = false; } else { - objContact[key.id] = element[this.associatedColmuns[key.id]].includes('\n') ? element[this.associatedColmuns[key.id]].split('\n') : element[this.associatedColmuns[key.id]]; + if (element[this.associatedColmuns[key.id]] === undefined) { + objContact[key.id] = ''; + } else { + objContact[key.id] = element[this.associatedColmuns[key.id]].includes('\n') ? element[this.associatedColmuns[key.id]].split('\n') : element[this.associatedColmuns[key.id]]; + } } }); dataToSend.push(objContact);