From 7d4500c72e961570ad9f100a517bdac91c362671 Mon Sep 17 00:00:00 2001 From: Hinton Date: Tue, 29 Mar 2022 11:28:30 +0200 Subject: [PATCH] Remove errors when cipher type is unknown --- common/src/models/view/cipherView.ts | 4 ++-- common/src/services/cipher.service.ts | 2 +- 2 files changed, 3 insertions(+), 3 deletions(-) diff --git a/common/src/models/view/cipherView.ts b/common/src/models/view/cipherView.ts index 3d1f16c1..b8c700dc 100644 --- a/common/src/models/view/cipherView.ts +++ b/common/src/models/view/cipherView.ts @@ -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) { diff --git a/common/src/services/cipher.service.ts b/common/src/services/cipher.service.ts index 0c5a9eaa..027b71df 100644 --- a/common/src/services/cipher.service.ts +++ b/common/src/services/cipher.service.ts @@ -1225,7 +1225,7 @@ export class CipherService implements CipherServiceAbstraction { ); return; default: - throw new Error("Unknown cipher type."); + return; } }