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

Commit 3b57e35

Browse files
committed
Handle orbitdb addresses in db_info requests
1 parent d6da3d9 commit 3b57e35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

src/lib/db-manager.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -32,6 +32,15 @@ class DBManager {
3232

3333
this.db_info = (dbn) => {
3434
var db = _dbs[dbn];
35+
if (!db) {
36+
_dbs.forEach(d => {
37+
if (dbn = d.id) {
38+
db = d
39+
} else if (dbn = [d.address.root, d.address.path].join('/')) {
40+
db = d
41+
}
42+
});
43+
}
3544
if (!db) return {};
3645
return {
3746
address: db.address,

0 commit comments

Comments
 (0)