trim slashes
This commit is contained in:
parent
79c15a1841
commit
dd2be22351
|
@ -107,8 +107,8 @@ export class CollectionService implements CollectionServiceAbstraction {
|
|||
const collectionCopy = new CollectionView();
|
||||
collectionCopy.id = c.id;
|
||||
collectionCopy.organizationId = c.organizationId;
|
||||
ServiceUtils.nestedTraverse(nodes, 0, c.name.split(NestingDelimiter), collectionCopy,
|
||||
null, NestingDelimiter);
|
||||
ServiceUtils.nestedTraverse(nodes, 0, c.name.replace(/^\/+|\/+$/g, '').split(NestingDelimiter),
|
||||
collectionCopy, null, NestingDelimiter);
|
||||
});
|
||||
return nodes;
|
||||
}
|
||||
|
|
|
@ -105,8 +105,8 @@ export class FolderService implements FolderServiceAbstraction {
|
|||
const folderCopy = new FolderView();
|
||||
folderCopy.id = f.id;
|
||||
folderCopy.revisionDate = f.revisionDate;
|
||||
ServiceUtils.nestedTraverse(nodes, 0, f.name.split(NestingDelimiter), folderCopy,
|
||||
null, NestingDelimiter);
|
||||
ServiceUtils.nestedTraverse(nodes, 0, f.name.replace(/^\/+|\/+$/g, '').split(NestingDelimiter),
|
||||
folderCopy, null, NestingDelimiter);
|
||||
});
|
||||
return nodes;
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue