fix
This commit is contained in:
@@ -21,7 +21,7 @@ module.exports = function(name){
|
|||||||
|
|
||||||
this.init = function(){
|
this.init = function(){
|
||||||
fs.readFile(this.file, (err, data) => {
|
fs.readFile(this.file, (err, data) => {
|
||||||
if (err.errno==-2 && err.code == "ENOENT"){
|
if (err && err.errno==-2 && err.code == "ENOENT"){
|
||||||
this.set(db);
|
this.set(db);
|
||||||
return;
|
return;
|
||||||
}else if (err) throw err;
|
}else if (err) throw err;
|
||||||
|
Reference in New Issue
Block a user