1
0
mirror of https://github.com/BoostIo/Boostnote synced 2025-12-13 17:56:25 +00:00

remove broken note from note list

When .cson is broken and catch error in processing this file,  undefined is collected in notes.

remved broken note(s) from notes list.
This commit is contained in:
yosmoc
2018-03-23 22:24:53 +01:00
parent 02095ac155
commit bdb906c26d

View File

@@ -27,9 +27,12 @@ function resolveStorageNotes (storage) {
data.storage = storage.key
return data
} catch (err) {
console.error(notePath)
console.error(`error on note path: ${notePath}, error: ${err}`)
}
})
.filter(function filterOnlyNoteObject (noteObj) {
return typeof noteObj === 'object'
})
return Promise.resolve(notes)
}