1
0
mirror of https://github.com/bitwarden/browser synced 2025-12-06 00:13:28 +00:00

persist archive date when cloning a cipher (#16986)

This commit is contained in:
Nick Krantz
2025-11-17 14:14:03 -06:00
committed by GitHub
parent de17b33dd5
commit 610537535a
2 changed files with 2 additions and 3 deletions

View File

@@ -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);
});
});

View File

@@ -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;