1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-09-13 01:58:44 +02:00

default type is login

This commit is contained in:
Kyle Spearrin 2018-10-25 08:20:31 -04:00
parent 4165a78277
commit 06f129e2c1

View File

@ -85,8 +85,12 @@ export class BitwardenCsvImporter extends BaseImporter implements Importer {
const valueType = value.type != null ? value.type.toLowerCase() : null;
switch (valueType) {
case 'login':
case null:
case 'note':
cipher.type = CipherType.SecureNote;
cipher.secureNote = new SecureNoteView();
cipher.secureNote.type = SecureNoteType.Generic;
break;
default:
cipher.type = CipherType.Login;
cipher.login = new LoginView();
cipher.login.totp = this.getValueOrDefault(value.login_totp || value.totp);
@ -95,13 +99,6 @@ export class BitwardenCsvImporter extends BaseImporter implements Importer {
const uris = this.parseSingleRowCsv(value.login_uri || value.uri);
cipher.login.uris = this.makeUriArray(uris);
break;
case 'note':
cipher.type = CipherType.SecureNote;
cipher.secureNote = new SecureNoteView();
cipher.secureNote.type = SecureNoteType.Generic;
break;
default:
break;
}
result.ciphers.push(cipher);