1
0
mirror of https://github.com/bitwarden/jslib synced 2025-12-30 15:13:22 +00:00

Remove errors when cipher type is unknown

This commit is contained in:
Hinton
2022-03-29 11:28:30 +02:00
parent 47473b7ede
commit 7d4500c72e
2 changed files with 3 additions and 3 deletions

View File

@@ -75,7 +75,7 @@ export class CipherView implements View {
}
get subTitle(): string {
return this.item.subTitle;
return this.item?.subTitle;
}
get hasPasswordHistory(): boolean {
@@ -115,7 +115,7 @@ export class CipherView implements View {
}
get linkedFieldOptions() {
return this.item.linkedFieldOptions;
return this.item?.linkedFieldOptions;
}
linkedFieldValue(id: LinkedIdType) {

View File

@@ -1225,7 +1225,7 @@ export class CipherService implements CipherServiceAbstraction {
);
return;
default:
throw new Error("Unknown cipher type.");
return;
}
}