From f6fb4fee2947fd05efc53ac7d84f89ca1fedc440 Mon Sep 17 00:00:00 2001 From: addison Date: Mon, 22 Feb 2021 15:00:19 -0500 Subject: [PATCH] refactor --- src/app/vault/vault.component.ts | 22 +--------------------- 1 file changed, 1 insertion(+), 21 deletions(-) diff --git a/src/app/vault/vault.component.ts b/src/app/vault/vault.component.ts index 4f8980f3ff..9178e85736 100644 --- a/src/app/vault/vault.component.ts +++ b/src/app/vault/vault.component.ts @@ -198,27 +198,7 @@ export class VaultComponent implements OnInit, OnDestroy { await this.viewCipher(cipherView); } } else if (params.action === 'add') { - switch (params.addType) { - case 'Login': - case '1': - this.addType = CipherType.Login; - break; - case 'SecureNote': - case '2': - this.addType = CipherType.SecureNote; - break; - case 'Card': - case '3': - this.addType = CipherType.Card; - break; - case 'Identity': - case '4': - this.addType = CipherType.Identity; - break; - default: - this.addType = CipherType.Login; - break; - } + this.addType = Number(params.addType); this.addCipher(this.addType); }