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

Commit

Permalink
fix: handle optional key to config.get
Browse files Browse the repository at this point in the history
Tactical fix to get the release out while we solve this properly
in #3067
  • Loading branch information
achingbrain committed Jun 5, 2020
1 parent 2530bbc commit 98b3559
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion packages/ipfs/src/core/components/config.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,14 @@ const log = require('debug')('ipfs:core:config')

module.exports = ({ repo }) => {
return {
get: withTimeoutOption(repo.config.get),
get: withTimeoutOption((key, options) => {
if (!options && key && typeof key === 'object') {
options = key
key = undefined
}

return repo.config.get(key, options)
}),
set: withTimeoutOption(repo.config.set),
replace: withTimeoutOption(repo.config.replace),
profiles: {
Expand Down

0 comments on commit 98b3559

Please sign in to comment.