From 3021afc9ddae1579f2226010ee487fa3edcddb0b Mon Sep 17 00:00:00 2001 From: Kyle Spearrin Date: Mon, 22 Oct 2018 14:47:49 -0400 Subject: [PATCH] protected loadCollections for add/edit --- src/angular/components/add-edit.component.ts | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/src/angular/components/add-edit.component.ts b/src/angular/components/add-edit.component.ts index 3da4a5ec96..89f94d4864 100644 --- a/src/angular/components/add-edit.component.ts +++ b/src/angular/components/add-edit.component.ts @@ -136,8 +136,7 @@ export class AddEditComponent implements OnInit { this.ownershipOptions.push({ name: o.name, value: o.id }); } }); - const allCollections = await this.collectionService.getAllDecrypted(); - this.writeableCollections = allCollections.filter((c) => !c.readOnly); + this.writeableCollections = await this.loadCollections(); } async load() { @@ -350,6 +349,11 @@ export class AddEditComponent implements OnInit { } } + protected async loadCollections() { + const allCollections = await this.collectionService.getAllDecrypted(); + return allCollections.filter((c) => !c.readOnly); + } + protected loadCipher() { return this.cipherService.get(this.cipherId); }