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

Added catch for exceptions, removed uneeded duplicate test.

This commit is contained in:
Milo Todt
2019-01-17 17:00:07 -08:00
parent 8d817066e8
commit eea01f10ac

View File

@@ -55,8 +55,12 @@ function init () {
})
}
})
if (unknownCount > 0 && fs.existsSync(storage.path)) {
if (unknownCount > 0) {
try {
CSON.writeFileSync(path.join(storage.path, 'boostnote.json'), _.pick(storage, ['folders', 'version']))
} catch (e) {
console.log('Error writting boostnote.json: ' + e + ' from init.js')
}
}
return notes
})