Skip to content
Snippets Groups Projects
Commit 1c44d9f4 authored by Florent Poittevin's avatar Florent Poittevin
Browse files

fix: error on arbo of deposit file when backend doesn't provide root folder

parent 296c58dc
No related branches found
No related tags found
No related merge requests found
...@@ -59,9 +59,9 @@ export class DepositFolderTreePresentational extends SharedAbstractPresentationa ...@@ -59,9 +59,9 @@ export class DepositFolderTreePresentational extends SharedAbstractPresentationa
if (isNullOrUndefined(this._listFolders)) { if (isNullOrUndefined(this._listFolders)) {
return; return;
} }
const listFoders = [...this._listFolders]; const listFolders = [...this._listFolders];
this.createIntermediateFolders(listFoders); this.createIntermediateFolders(listFolders);
this.dataSource.data = listFoders; this.dataSource.data = listFolders;
} }
private _transformer = (fullFolderName: string): FlatNode => ({ private _transformer = (fullFolderName: string): FlatNode => ({
...@@ -91,6 +91,9 @@ export class DepositFolderTreePresentational extends SharedAbstractPresentationa ...@@ -91,6 +91,9 @@ export class DepositFolderTreePresentational extends SharedAbstractPresentationa
// const path.split(this._SEPARATOR); // const path.split(this._SEPARATOR);
}); });
listFolders.push(...this.listNewIntermediateFolder); listFolders.push(...this.listNewIntermediateFolder);
if (!listFolders.includes(this._ROOT)) {
listFolders.push(this._ROOT);
}
this.sort(listFolders); this.sort(listFolders);
} }
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment