1
0
mirror of https://github.com/bitwarden/browser synced 2026-02-18 18:33:50 +00:00

move archive check into conditional to avoid undefined error (#18000)

This commit is contained in:
Nick Krantz
2025-12-16 12:08:03 -06:00
committed by jaasen-livefront
parent 1662607467
commit e954d3d493

View File

@@ -253,7 +253,7 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
protected showRestore: boolean;
protected cipherIsArchived: boolean;
protected cipherIsArchived: boolean = false;
protected get loadingForm() {
return this.loadForm && !this.formReady;
@@ -350,6 +350,8 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
return;
}
this.cipherIsArchived = this.cipher.isArchived;
this.collections = this.formConfig.collections.filter((c) =>
this.cipher.collectionIds?.includes(c.id),
);
@@ -375,7 +377,6 @@ export class VaultItemDialogComponent implements OnInit, OnDestroy {
this.filter = await firstValueFrom(this.routedVaultFilterService.filter$);
this.showRestore = await this.canUserRestore();
this.cipherIsArchived = this.cipher.isArchived;
this.performingInitialLoad = false;
}