Skip to content
This repository was archived by the owner on Sep 30, 2023. It is now read-only.

Commit 705bcb0

Browse files
authored
Merge pull request #5 from orbitdb/fix/slash-case
Fix slash-cid case
2 parents cbb84e5 + 70cf507 commit 705bcb0

File tree

2 files changed

+6
-1
lines changed

2 files changed

+6
-1
lines changed

index.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,11 @@ const stringifyCid = (cid, options) => {
2222
if (Array.isArray(cid)) {
2323
return cid.map(stringifyCid)
2424
}
25+
26+
if (cid['/']) {
27+
return cid['/']
28+
}
29+
2530
const base = options.base || defaultBase
2631
return cid.toBaseEncodedString(base)
2732
}

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "orbit-db-io",
3-
"version": "0.1.0",
3+
"version": "0.1.1",
44
"description": "IO helper module for orbit-db",
55
"main": "index.js",
66
"scripts": {

0 commit comments

Comments
 (0)