We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent db7b0f9 commit 3ae6282Copy full SHA for 3ae6282
packages/core/src/config/index.js
@@ -475,6 +475,10 @@ function _getConfig () {
475
return {}
476
}
477
478
+ if (!fs.existsSync(configFilePath)) {
479
+ return {}
480
+ }
481
+
482
return jsonApi.parse(fs.readFileSync(configFilePath))
483
484
packages/mitmproxy/src/json.js
@@ -6,6 +6,9 @@ if (JSON5.default) {
6
7
module.exports = {
8
parse (str) {
9
+ if (str == null || str.length < 2) {
10
11
12
return JSON5.parse(str)
13
},
14
stringify (obj) {
0 commit comments