diff --git a/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts b/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts index a002956b54a..1e60ad91fb1 100644 --- a/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts +++ b/libs/vault/src/cipher-form/components/cipher-form.component.spec.ts @@ -154,13 +154,13 @@ describe("CipherFormComponent", () => { expect(component["updatedCipherView"]?.login.fido2Credentials).toBeNull(); }); - it("clears archiveDate on updatedCipherView", async () => { + it("does not clear archiveDate on updatedCipherView", async () => { cipherView.archivedDate = new Date(); decryptCipher.mockResolvedValue(cipherView); await component.ngOnInit(); - expect(component["updatedCipherView"]?.archivedDate).toBeNull(); + expect(component["updatedCipherView"]?.archivedDate).toBe(cipherView.archivedDate); }); }); diff --git a/libs/vault/src/cipher-form/components/cipher-form.component.ts b/libs/vault/src/cipher-form/components/cipher-form.component.ts index 5e75ea5bc24..f94af25e90a 100644 --- a/libs/vault/src/cipher-form/components/cipher-form.component.ts +++ b/libs/vault/src/cipher-form/components/cipher-form.component.ts @@ -281,7 +281,6 @@ export class CipherFormComponent implements AfterViewInit, OnInit, OnChanges, Ci if (this.config.mode === "clone") { this.updatedCipherView.id = null; - this.updatedCipherView.archivedDate = null; if (this.updatedCipherView.login) { this.updatedCipherView.login.fido2Credentials = null;