Skip to content

Commit

Permalink
Use ?? over typeof
Browse files Browse the repository at this point in the history
  • Loading branch information
razor-x authored Sep 10, 2024
1 parent 23eb9e7 commit b182d99
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions lib/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,11 +10,10 @@ export const loadConfig = async (configPath) => {
)
}

if (typeof config.checksumPrefix === 'undefined') {
config.checksumPrefix = 'benthos'
return {
...config,
checksumPrefix: config.checksumPrefix ?? 'benthos'
}

return config
}

export const loadJson = async (name) => {
Expand Down

0 comments on commit b182d99

Please sign in to comment.