Skip to content

Commit d172361

Browse files
authored
fix: backport remove instanceof (#13)
Backports #11 to the v1.x.x release line
1 parent b442488 commit d172361

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/index.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ const { BlockstoreAdapter } = require('interface-blockstore')
2020
function cidToKey (cid) {
2121
const c = CID.asCID(cid)
2222

23-
if (!(c instanceof CID)) {
23+
if (!c) {
2424
throw errcode(new Error('Not a valid cid'), 'ERR_INVALID_CID')
2525
}
2626

0 commit comments

Comments
 (0)