Skip to content

Commit

Permalink
lint fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
zenitraM committed Sep 8, 2023
1 parent ab37523 commit e4c7d97
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions frontend/src/reports/import/Extract.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -20,18 +20,11 @@
currentIndex = 0;
}
function submitOrNext() {
if (currentIndex < entries.length - 1) {
nextEntry();
} else {
save();
}
}
function nextEntry() {
if(skipDuplicates) {
for (let index = currentIndex+1; index < entries.length; index++) {
if (!isDuplicate(entries[index]!)) {
for (let index = currentIndex+1; index < entries.length; index+=1) {
const newEntry = entries[index];
if (newEntry !== undefined && !isDuplicate(newEntry)) {
currentIndex = index;
return;
}
Expand All @@ -41,11 +34,20 @@
currentIndex += 1;
}
}
function submitOrNext() {
if (currentIndex < entries.length - 1) {
nextEntry();
} else {
save();
}
}
function previousEntry() {
if(skipDuplicates) {
for (let index = currentIndex-1; index >= 0; index--) {
if (!isDuplicate(entries[index]!)) {
for (let index = currentIndex-1; index >= 0; index-=1) {
const newEntry = entries[index];
if (newEntry !== undefined && !isDuplicate(newEntry)) {
currentIndex = index;
return;
}
Expand Down

0 comments on commit e4c7d97

Please sign in to comment.