From 718a99b2252ae32b38f39aa4fc1bfcd688eb0f3b Mon Sep 17 00:00:00 2001 From: Enrico Fasoli Date: Fri, 9 Feb 2018 00:42:14 +0100 Subject: [PATCH] fix board peers stat --- src/utils/ipfs.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/ipfs.js b/src/utils/ipfs.js index 8720286..a41cd4a 100644 --- a/src/utils/ipfs.js +++ b/src/utils/ipfs.js @@ -37,9 +37,9 @@ export async function getStats() { }, peers: [] } - const subscription = orbitDb._pubsub._subscriptions + const subscription = orbitDb._pubsub._subscriptions[db.address] if (subscription && subscription.room) { - dbInfo.peers = subscription.room._peers + dbInfo.peers = [...(subscription.room._peers || [])] } dbs[db.address] = dbInfo })