Skip to content
This repository has been archived by the owner on Mar 10, 2020. It is now read-only.

Commit

Permalink
fix: avoid creating a cid with a null result
Browse files Browse the repository at this point in the history
  • Loading branch information
jacobheun committed Sep 12, 2018
1 parent 62212c4 commit 59bcf3c
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion src/core/utils/with-mfs-root.js
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,8 @@ const withMfsRoot = (ipfs, callback) => {
], cb)
}

cb(error, new CID(result))
const cid = result ? new CID(result) : null
cb(error, cid)
})
},
// Turn the Buffer into a CID
Expand Down

0 comments on commit 59bcf3c

Please sign in to comment.