mirror of
https://github.com/BoostIo/Boostnote
synced 2025-12-14 18:26:26 +00:00
Fix exportFolder error
writeFileSync doesn't require any errors
This commit is contained in:
@@ -46,9 +46,7 @@ function exportFolder (storageKey, folderKey, fileType, exportDir) {
|
|||||||
.filter(note => note.folder === folderKey && note.isTrashed === false && note.type === 'MARKDOWN_NOTE')
|
.filter(note => note.folder === folderKey && note.isTrashed === false && note.type === 'MARKDOWN_NOTE')
|
||||||
.forEach(snippet => {
|
.forEach(snippet => {
|
||||||
const notePath = path.join(exportDir, `${snippet.title}.${fileType}`)
|
const notePath = path.join(exportDir, `${snippet.title}.${fileType}`)
|
||||||
fs.writeFileSync(notePath, snippet.content, (err) => {
|
fs.writeFileSync(notePath, snippet.content)
|
||||||
if (err) throw err
|
|
||||||
})
|
|
||||||
})
|
})
|
||||||
|
|
||||||
return {
|
return {
|
||||||
|
|||||||
Reference in New Issue
Block a user