[PM-9959] Ensure cipherType defaults to CipherType.Login if none is available
This commit is contained in:
parent
8827fd7067
commit
7090e3fa96
|
@ -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.
|
||||
|
|
|
@ -48,7 +48,7 @@ export class DefaultCipherFormConfigService implements CipherFormConfigService {
|
|||
|
||||
return {
|
||||
mode,
|
||||
cipherType,
|
||||
cipherType: cipher?.type ?? cipherType ?? CipherType.Login,
|
||||
admin: false,
|
||||
allowPersonalOwnership,
|
||||
originalCipher: cipher,
|
||||
|
|
Loading…
Reference in New Issue