Skip to content

Commit 8f8616f

Browse files
Alan Shawlidel
Alan Shaw
authored andcommitted
fix: double validate (#25)
We don't need to check a CID is a CID immediately after it's created 😉. License: MIT Signed-off-by: Alan Shaw <alan.shaw@protocol.ai>
1 parent 8804b66 commit 8f8616f

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/index.js

+2-1
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,8 @@ function isMultibase (hash) {
3535

3636
function isCID (hash) {
3737
try {
38-
return CID.isCID(new CID(hash))
38+
new CID(hash) // eslint-disable-line no-new
39+
return true
3940
} catch (e) {
4041
return false
4142
}

0 commit comments

Comments
 (0)