Skip to content

Commit 39c699e

Browse files
committed
fix: recursive normalizeConfig
License: MIT Signed-off-by: Henrique Dias <hacdias@gmail.com>
1 parent 305d74b commit 39c699e

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

network/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,15 +46,15 @@ function normalizeConfig (config) {
4646
}
4747

4848
if (Array.isArray(config)) {
49-
return config.map(fixConfig)
49+
return config.map(normalizeConfig)
5050
}
5151

5252
const parsed = {}
5353

5454
for (let [key, value] of Object.entries(config)) {
5555
if (key === 'callbackState') key = 'State'
5656
if (key === 'ip') key = 'IP'
57-
parsed[key.charAt(0).toUpperCase() + key.slice(1)] = fixConfig(value)
57+
parsed[key.charAt(0).toUpperCase() + key.slice(1)] = normalizeConfig(value)
5858
}
5959

6060
return parsed

0 commit comments

Comments
 (0)