1
0
mirror of https://github.com/bitwarden/browser synced 2026-01-30 00:03:30 +00:00

Fix type issues

This commit is contained in:
Nik Gilmore
2026-01-16 15:12:17 -08:00
parent f2960bbd59
commit ef299f398a
2 changed files with 5 additions and 2 deletions

View File

@@ -210,7 +210,7 @@ describe("DefaultCipherSdkService", () => {
id: expect.anything(),
name: cipherView.name,
}),
undefined,
new CipherView().toSdkCipherView(),
);
expect(result).toBeInstanceOf(CipherView);
expect(result.name).toBe(cipherView.name);

View File

@@ -63,7 +63,10 @@ export class DefaultCipherSdkService implements CipherSdkService {
.vault()
.ciphers()
.admin()
.edit(sdkUpdateRequest, originalCipherView?.toSdkCipherView());
.edit(
sdkUpdateRequest,
originalCipherView?.toSdkCipherView() || new CipherView().toSdkCipherView(),
);
} else {
result = await ref.value.vault().ciphers().edit(sdkUpdateRequest);
}