fixed a few minor issues

This commit is contained in:
tigerbot 2017-07-07 13:48:40 -06:00
parent 85a0c3d421
commit e52ae83aa4
2 changed files with 3 additions and 3 deletions

View File

@ -59,14 +59,14 @@ module.exports.create = function () {
if (err) { if (err) {
reject(err); reject(err);
} else { } else {
resolve(); resolve(curState());
} }
}); });
}); });
} }
return { return {
isRunning: curState curState: curState
, start: start , start: start
, stop: stop , stop: stop
}; };

View File

@ -11,7 +11,7 @@ module.exports.create = function (deps, conf) {
function read(fileName) { function read(fileName) {
return fs.readFileAsync(path.join(storageDir, fileName)) return fs.readFileAsync(path.join(storageDir, fileName))
.then(JSON.parse, function (err) { .then(JSON.parse, function (err) {
if (err.code === 'ENOEXIST') { if (err.code === 'ENOENT') {
return {}; return {};
} }
throw err; throw err;