Skip to content

Commit

Permalink
fix: backport remove instanceof (#13)
Browse files Browse the repository at this point in the history
Backports #11 to the v1.x.x release line
  • Loading branch information
achingbrain authored Sep 17, 2021
1 parent b442488 commit d172361
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ const { BlockstoreAdapter } = require('interface-blockstore')
function cidToKey (cid) {
const c = CID.asCID(cid)

if (!(c instanceof CID)) {
if (!c) {
throw errcode(new Error('Not a valid cid'), 'ERR_INVALID_CID')
}

Expand Down

0 comments on commit d172361

Please sign in to comment.