fix
This commit is contained in:
parent
5b325c4ae5
commit
de1a8c3cb8
@ -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;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user