mirror of
https://github.com/bitwarden/browser
synced 2025-12-12 22:33:35 +00:00
[PM-11497] If an org has only one collection, check it by default (#10806)
Signed-off-by: Shlomo Zalman Heigh <shlomozalmanheigh@gmail.com>
This commit is contained in:
committed by
GitHub
parent
9ea9c3a932
commit
a4123cb8ba
@@ -605,6 +605,10 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
|||||||
this.collections = this.writeableCollections?.filter(
|
this.collections = this.writeableCollections?.filter(
|
||||||
(c) => c.organizationId === this.cipher.organizationId,
|
(c) => c.organizationId === this.cipher.organizationId,
|
||||||
);
|
);
|
||||||
|
// If there's only one collection, check it by default
|
||||||
|
if (this.collections.length === 1) {
|
||||||
|
(this.collections[0] as any).checked = true;
|
||||||
|
}
|
||||||
const org = await this.organizationService.get(this.cipher.organizationId);
|
const org = await this.organizationService.get(this.cipher.organizationId);
|
||||||
if (org != null) {
|
if (org != null) {
|
||||||
this.cipher.organizationUseTotp = org.useTotp;
|
this.cipher.organizationUseTotp = org.useTotp;
|
||||||
|
|||||||
Reference in New Issue
Block a user