diff --git a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts index e31c2620e8..84fd9295ab 100644 --- a/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts +++ b/apps/browser/src/vault/popup/components/vault-v2/add-edit/add-edit-v2.component.ts @@ -40,7 +40,7 @@ import { OpenAttachmentsComponent } from "../attachments/open-attachments/open-a class QueryParams { constructor(params: Params) { this.cipherId = params.cipherId; - this.type = parseInt(params.type, null); + this.type = params.type != undefined ? parseInt(params.type, null) : undefined; this.clone = params.clone === "true"; this.folderId = params.folderId; this.organizationId = params.organizationId; @@ -56,7 +56,7 @@ class QueryParams { /** * The type of cipher to create. */ - type: CipherType; + type?: CipherType; /** * Whether to clone the cipher. diff --git a/libs/vault/src/cipher-form/services/default-cipher-form-config.service.ts b/libs/vault/src/cipher-form/services/default-cipher-form-config.service.ts index 166e1bd58d..4171f153ec 100644 --- a/libs/vault/src/cipher-form/services/default-cipher-form-config.service.ts +++ b/libs/vault/src/cipher-form/services/default-cipher-form-config.service.ts @@ -48,7 +48,7 @@ export class DefaultCipherFormConfigService implements CipherFormConfigService { return { mode, - cipherType, + cipherType: cipher?.type ?? cipherType ?? CipherType.Login, admin: false, allowPersonalOwnership, originalCipher: cipher,