Skip to content

Commit b182d99

Browse files
authored
Use ?? over typeof
1 parent 23eb9e7 commit b182d99

File tree

1 file changed

+3
-4
lines changed

1 file changed

+3
-4
lines changed

Diff for: lib/config.js

+3-4
Original file line numberDiff line numberDiff line change
@@ -10,11 +10,10 @@ export const loadConfig = async (configPath) => {
1010
)
1111
}
1212

13-
if (typeof config.checksumPrefix === 'undefined') {
14-
config.checksumPrefix = 'benthos'
13+
return {
14+
...config,
15+
checksumPrefix: config.checksumPrefix ?? 'benthos'
1516
}
16-
17-
return config
1817
}
1918

2019
export const loadJson = async (name) => {

0 commit comments

Comments
 (0)