diff --git a/src/index.js b/src/index.js index e90fd80..0d86f67 100644 --- a/src/index.js +++ b/src/index.js @@ -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') }