fixed bug reading non-existant config files
This commit is contained in:
父節點
c9318b65b0
當前提交
de3977d1e4
@ -43,7 +43,7 @@ function createStorage(filename, filetype) {
|
|||||||
function read() {
|
function read() {
|
||||||
return fs.readFileAsync(filename).then(parse).catch(function (err) {
|
return fs.readFileAsync(filename).then(parse).catch(function (err) {
|
||||||
if (err.code === 'ENOENT') {
|
if (err.code === 'ENOENT') {
|
||||||
return '';
|
return {};
|
||||||
}
|
}
|
||||||
return PromiseA.reject(err);
|
return PromiseA.reject(err);
|
||||||
});
|
});
|
||||||
|
載入中…
x
新增問題並參考
Block a user