mirror of
https://github.com/bitwarden/browser
synced 2026-02-13 23:13:36 +00:00
Updated fido2Credentials to initialize as null instead of empty array (#6548)
* Updated fido2Credentials to be null instead of empty string * Updated cipher tests. * Fixed tests. * Updated view and clone logic. * Updated templates to handle null value. * Further null checks.
This commit is contained in:
@@ -328,8 +328,8 @@ export class AddEditComponent implements OnInit, OnDestroy {
|
||||
if (this.cloneMode) {
|
||||
this.cipher.id = null;
|
||||
|
||||
if (this.cipher.type === CipherType.Login && this.cipher.login.fido2Credentials.length > 0) {
|
||||
this.cipher.login.fido2Credentials = [];
|
||||
if (this.cipher.type === CipherType.Login && this.cipher.login.hasFido2Credentials) {
|
||||
this.cipher.login.fido2Credentials = null;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
@@ -157,7 +157,7 @@ export class ViewComponent implements OnDestroy, OnInit {
|
||||
}
|
||||
|
||||
async clone() {
|
||||
if (this.cipher.login?.fido2Credentials.length > 0) {
|
||||
if (this.cipher.login?.hasFido2Credentials) {
|
||||
const confirmed = await this.dialogService.openSimpleDialog({
|
||||
title: { key: "passkeyNotCopied" },
|
||||
content: { key: "passkeyNotCopiedAlert" },
|
||||
|
||||
Reference in New Issue
Block a user