Skip to content
This repository was archived by the owner on Sep 28, 2021. It is now read-only.

fix: use .cid property before falling back to .multihash #12

Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion src/resolver.js
Original file line number Diff line number Diff line change
Expand Up @@ -86,7 +86,7 @@ const cid = promisify((ipfs, path, callback) => {
try {
// assume a Buffer with a valid CID
// (cid is allowed instead of multihash since https://github.com/ipld/js-ipld-dag-pb/pull/80)
cidOfNextFile = new CID(link.multihash)
cidOfNextFile = new CID(link.cid)
} catch (err) {
// fallback to multihash
cidOfNextFile = new CID(mh.toB58String(link.multihash))
Expand Down