diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts index de9784337a53079c6f907f4622e592b778b4fec7..c0a0e34fbd823c0f3297307cd7c76754142c9591 100644 --- a/src/frontend/app/indexation/indexation.component.ts +++ b/src/frontend/app/indexation/indexation.component.ts @@ -67,11 +67,13 @@ export class IndexationComponent implements OnInit { this.http.get(`../rest/documents/${resId}`).pipe( tap((data: any) => { let ref = ''; - let arrRef = data.document.reference.split('/'); - arrRef = arrRef.slice(3, arrRef.length); + if (!this.functionsService.empty(data.document.reference)) { + let arrRef = data.document.reference.split('/'); + arrRef = arrRef.slice(3, arrRef.length); - if (arrRef.length > 0) { - ref = arrRef.join('/'); + if (arrRef.length > 0) { + ref = arrRef.join('/'); + } } this.filesToUpload.push({