1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

copy org id too

This commit is contained in:
Kyle Spearrin 2018-11-05 14:48:07 -05:00
parent 4a13e62477
commit 6fa3538cbc

View File

@ -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;