Browse Source

fix undefined

Kieran Gibb 2 years ago
parent
commit
962e7ce8ce
No known key found for this signature in database
1 changed files with 2 additions and 1 deletions
  1. 2
    1
      index.js

+ 2
- 1
index.js View File

@@ -34,7 +34,8 @@ class CoBoxConfig {
34 34
     mkdirp.sync(path.join(this.root, 'logs'))
35 35
     mkdirp.sync(this.secrets)
36 36
 
37
-    var config = opts.seeds || defaultConfig()
37
+    var config = Object.assign(defaultConfig(), opts.seeds || {})
38
+
38 39
     if (!fs.existsSync(this.storage)) {
39 40
       fs.writeFileSync(this.storage, yaml.safeDump(defaultConfig(), { sortKeys: true }))
40 41
       this._groups = config.groups