Skip to content
This repository has been archived by the owner on Jun 17, 2022. It is now read-only.

Commit

Permalink
copy org id too
Browse files Browse the repository at this point in the history
  • Loading branch information
kspearrin committed Nov 5, 2018
1 parent 4a13e62 commit 6fa3538
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/services/collection.service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -103,10 +103,11 @@ export class CollectionService implements CollectionServiceAbstraction {
collections = await this.getAllDecrypted();
}
const nodes: Array<TreeNode<CollectionView>> = [];
collections.forEach((f) => {
collections.forEach((c) => {
const collectionCopy = new CollectionView();
collectionCopy.id = f.id;
ServiceUtils.nestedTraverse(nodes, 0, f.name.split(NestingDelimiter), collectionCopy,
collectionCopy.id = c.id;
collectionCopy.organizationId = c.organizationId;
ServiceUtils.nestedTraverse(nodes, 0, c.name.split(NestingDelimiter), collectionCopy,
null, NestingDelimiter);
});
return nodes;
Expand Down

0 comments on commit 6fa3538

Please sign in to comment.