小调整
parent
2218e808dd
commit
8857449217
|
@ -62,7 +62,9 @@ function _loadFromFile (defaultConfig) {
|
||||||
const file = fs.readFileSync(configPath)
|
const file = fs.readFileSync(configPath)
|
||||||
log.info('读取 automaticCompatibleConfig.json 成功:', configPath)
|
log.info('读取 automaticCompatibleConfig.json 成功:', configPath)
|
||||||
const fileStr = file.toString()
|
const fileStr = file.toString()
|
||||||
config = fileStr && fileStr.length > 2 ? jsonApi.parse(fileStr) : {}
|
config = fileStr && fileStr.length > 2 ? jsonApi.parse(fileStr) : defaultConfig
|
||||||
|
if (config.connect == null) config.connect = defaultConfig.connect
|
||||||
|
if (config.request == null) config.request = defaultConfig.request
|
||||||
}
|
}
|
||||||
|
|
||||||
return config
|
return config
|
||||||
|
|
Loading…
Reference in New Issue