Skip to content

Commit 52ed08d

Browse files
committed
fix parse config error when global config file is empty. closes kriskbx#54
1 parent 3342db6 commit 52ed08d

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/include/file-config.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,8 @@ class fileConfig extends config {
4949
let local = Object.assign({extend: true}, yaml.sync(this.local, {}));
5050

5151
if (local.extend === true) {
52-
local = Object.assign(this.parseGlobal(), local);
52+
let global = this.parseGlobal();
53+
local = Object.assign(global ? global : {}, local);
5354
} else if (local.extend) {
5455
try {
5556
local = Object.assign(yaml.sync(local.extend, {}), local);

0 commit comments

Comments
 (0)