mirror of
https://github.com/bitwarden/browser.git
synced 2024-11-27 12:36:14 +01:00
fix grouping first
This commit is contained in:
parent
09df62db4c
commit
62b074ae22
@ -25,12 +25,16 @@ export class LastPassCsvImporter extends BaseImporter implements Importer {
|
||||
results.forEach((value, index) => {
|
||||
const cipherIndex = result.ciphers.length;
|
||||
let folderIndex = result.folders.length;
|
||||
const hasFolder = this.getValueOrDefault(value.grouping, '(none)') !== '(none)';
|
||||
let grouping = value.grouping;
|
||||
if (grouping != null) {
|
||||
grouping = grouping.replace(/\\/g, '/');
|
||||
}
|
||||
const hasFolder = this.getValueOrDefault(grouping, '(none)') !== '(none)';
|
||||
let addFolder = hasFolder;
|
||||
|
||||
if (hasFolder) {
|
||||
for (let i = 0; i < result.folders.length; i++) {
|
||||
if (result.folders[i].name === value.grouping) {
|
||||
if (result.folders[i].name === grouping) {
|
||||
addFolder = false;
|
||||
folderIndex = i;
|
||||
break;
|
||||
@ -67,10 +71,7 @@ export class LastPassCsvImporter extends BaseImporter implements Importer {
|
||||
|
||||
if (addFolder) {
|
||||
const f = new FolderView();
|
||||
f.name = value.grouping;
|
||||
if (f.name != null) {
|
||||
f.name = f.name.replace(/\\/g, '/');
|
||||
}
|
||||
f.name = grouping;
|
||||
result.folders.push(f);
|
||||
}
|
||||
if (hasFolder) {
|
||||
|
Loading…
Reference in New Issue
Block a user