From e62d0b29876b70575a74f033b400b80df4c93fd4 Mon Sep 17 00:00:00 2001 From: Thomas Rittson <31796059+eliykat@users.noreply.github.com> Date: Mon, 6 Feb 2023 11:53:14 +1000 Subject: [PATCH] Fix race condition when adding item from collections list (#4639) --- libs/angular/src/vault/components/add-edit.component.ts | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/libs/angular/src/vault/components/add-edit.component.ts b/libs/angular/src/vault/components/add-edit.component.ts index 0a7908ffcb..520665c668 100644 --- a/libs/angular/src/vault/components/add-edit.component.ts +++ b/libs/angular/src/vault/components/add-edit.component.ts @@ -161,6 +161,9 @@ export class AddEditComponent implements OnInit, OnDestroy { } async ngOnInit() { + this.writeableCollections = await this.loadCollections(); + this.canUseReprompt = await this.passwordRepromptService.enabled(); + this.policyService .policyAppliesToActiveUser$(PolicyType.PersonalOwnership) .pipe( @@ -201,10 +204,6 @@ export class AddEditComponent implements OnInit, OnDestroy { if (!this.allowPersonal) { this.organizationId = this.ownershipOptions[0].value; } - - this.writeableCollections = await this.loadCollections(); - - this.canUseReprompt = await this.passwordRepromptService.enabled(); } async load() {