1
0
mirror of https://github.com/fazo96/ipfs-boards synced 2025-01-10 12:24:20 +01:00

fix board peers stat

This commit is contained in:
Enrico Fasoli 2018-02-09 00:42:14 +01:00
parent 4495658be7
commit 718a99b225
No known key found for this signature in database
GPG Key ID: 1238873C5F27DB4D

View File

@ -37,9 +37,9 @@ export async function getStats() {
}, },
peers: [] peers: []
} }
const subscription = orbitDb._pubsub._subscriptions const subscription = orbitDb._pubsub._subscriptions[db.address]
if (subscription && subscription.room) { if (subscription && subscription.room) {
dbInfo.peers = subscription.room._peers dbInfo.peers = [...(subscription.room._peers || [])]
} }
dbs[db.address] = dbInfo dbs[db.address] = dbInfo
}) })