Skip to content

Commit 2acff13

Browse files
committed
Minor edits
1 parent 7810d01 commit 2acff13

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/notes_importer.js

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ export async function importNotes(notesDir, onlyWithErrors = false) {
4949
}
5050

5151
export async function importNotesWithErrors(notesDir) {
52-
const notes = (await loadImportStatuses()).filter(it => it.error)
52+
const notes = (await loadImportStatuses()).filter(it => it.error && !it.skip)
5353
let fileIndex = 0
5454

5555
for (const noteInfo of notes) {
@@ -79,7 +79,7 @@ export async function importNotesWithErrors(notesDir) {
7979
try {
8080
noteInfo.data = readFileSync(filePath, 'utf8')
8181
} catch (e) {
82-
console.error('error in file: ', noteInfo.filePath, '\n', e)
82+
console.error(`error in file: ${noteInfo.filePath}\n${e}`)
8383
}
8484

8585
if (!noteInfo.data) {
@@ -93,7 +93,7 @@ export async function importNotesWithErrors(notesDir) {
9393
} catch (e) {
9494
noteInfo.imported = false
9595
noteInfo.error = e.body || e
96-
console.error('ERROR')
96+
console.error(`ERROR with note id: ${noteInfo.id}`)
9797
}
9898
await updateImportStatus(noteInfo)
9999
}

0 commit comments

Comments
 (0)