1
0
mirror of https://github.com/bitwarden/browser.git synced 2024-11-27 12:36:14 +01:00

change to secure note if not login

This commit is contained in:
Kyle Spearrin 2018-07-12 09:21:35 -04:00
parent b4846e5fea
commit 768b41153d

View File

@ -29,13 +29,14 @@ export class EnpassCsvImporter extends BaseImporter implements Importer {
cipher.notes = this.getValueOrDefault(value[value.length - 1]);
cipher.name = this.getValueOrDefault(value[0], '--');
if (value.length === 2) {
if (value.length === 2 || (value.indexOf('Username') < 0 && value.indexOf('Password') < 0 &&
value.indexOf('Email') && value.indexOf('URL') < 0)) {
cipher.type = CipherType.SecureNote;
cipher.secureNote = new SecureNoteView();
cipher.secureNote.type = SecureNoteType.Generic;
}
if (value.indexOf('Cardholder') > -1 && value.indexOf('Number') > -1 && value.indexOf('Expiry date')) {
if (value.indexOf('Cardholder') > -1 && value.indexOf('Number') > -1 && value.indexOf('Expiry date') > -1) {
cipher.type = CipherType.Card;
cipher.card = new CardView();
}