Skip to content

Commit

Permalink
fix: pinning of IPNS paths
Browse files Browse the repository at this point in the history
  • Loading branch information
lidel committed Jul 27, 2018
1 parent 04e3df7 commit 68bb194
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion add-on/src/popup/browser-action/store.js
Original file line number Diff line number Diff line change
Expand Up @@ -277,7 +277,8 @@ async function resolveToIPFS (ipfs, urlOrPath) {
let path = safeIpfsPath(urlOrPath) // https://github.com/ipfs/ipfs-companion/issues/303
if (/^\/ipns/.test(path)) {
const response = await ipfs.name.resolve(path, {recursive: true, nocache: false})
return response.Path
// old API returned object, latest one returns string ¯\_(ツ)_/¯
return response.Path ? response.Path : response
}
return path
}

0 comments on commit 68bb194

Please sign in to comment.