Skip to content

Commit 99aa1f9

Browse files
committed
fix: cosmiconfig result should not be changed directly
resolve #65
1 parent d6c2ea2 commit 99aa1f9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/load-config/load-milirc.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ module.exports = async cwd => {
3030
const result = await explorer.load(filepath)
3131
if (!result) return config
3232

33-
config = result.config || {}
33+
if (result.config) config = JSON.parse(JSON.stringify(result.config))
3434

3535
if (semver.lt(config.mili.version, '2.0.0')) {
3636
config = formatVersion1Config(config)

0 commit comments

Comments
 (0)