Skip to content
This repository was archived by the owner on Feb 12, 2024. It is now read-only.

Commit d043138

Browse files
authored
fix: handle optional key to config.get (#3069)
Tactical fix to get the release out while we solve this properly in #3067
1 parent 2530bbc commit d043138

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

packages/ipfs/src/core/components/config.js

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,14 @@ const log = require('debug')('ipfs:core:config')
66

77
module.exports = ({ repo }) => {
88
return {
9-
get: withTimeoutOption(repo.config.get),
9+
get: withTimeoutOption((key, options) => {
10+
if (!options && key && typeof key === 'object') {
11+
options = key
12+
key = undefined
13+
}
14+
15+
return repo.config.get(key, options)
16+
}),
1017
set: withTimeoutOption(repo.config.set),
1118
replace: withTimeoutOption(repo.config.replace),
1219
profiles: {

0 commit comments

Comments
 (0)