Merge pull request #208 from Dahlgren/bugfix/manager-save-error

Log errors while saving servers instead of crashing
This commit is contained in:
Björn Dahlgren 2021-12-30 02:53:44 +01:00 committed by GitHub
commit c5d69ac61b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -127,7 +127,7 @@ Manager.prototype.save = function () {
fs.writeFile(filePath, JSON.stringify(data), function (err) {
if (err) {
throw err
console.error('Manager save error: ' + err)
} else {
self.emit('servers')
}