1
0
mirror of https://github.com/bitwarden/browser synced 2025-01-15 11:58:21 +01:00

Fix race condition when adding item from collections list (#4639)

This commit is contained in:
Thomas Rittson 2023-02-06 11:53:14 +10:00 committed by GitHub
parent 8a9e59094a
commit e62d0b2987
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -161,6 +161,9 @@ export class AddEditComponent implements OnInit, OnDestroy {
} }
async ngOnInit() { async ngOnInit() {
this.writeableCollections = await this.loadCollections();
this.canUseReprompt = await this.passwordRepromptService.enabled();
this.policyService this.policyService
.policyAppliesToActiveUser$(PolicyType.PersonalOwnership) .policyAppliesToActiveUser$(PolicyType.PersonalOwnership)
.pipe( .pipe(
@ -201,10 +204,6 @@ export class AddEditComponent implements OnInit, OnDestroy {
if (!this.allowPersonal) { if (!this.allowPersonal) {
this.organizationId = this.ownershipOptions[0].value; this.organizationId = this.ownershipOptions[0].value;
} }
this.writeableCollections = await this.loadCollections();
this.canUseReprompt = await this.passwordRepromptService.enabled();
} }
async load() { async load() {