diff --git a/src/frontend/app/indexation/indexation.component.ts b/src/frontend/app/indexation/indexation.component.ts index 7097bde06271a8ee30983bdb3a442b9ad68b1f4d..af3826bd8f2f9e1777d626d2d9ad6626cc29e867 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({