fix(peers): fix display peers count in gui

This commit is contained in:
Alexey Kasyanchuk 2018-04-01 02:28:49 +03:00
parent bda58b135c
commit 99c9c28164

View File

@ -462,7 +462,7 @@ module.exports = ({
callback({ callback({
size: p2p.size, size: p2p.size,
torrents: p2p.peersList().reduce((a, b) => (a.info ? a.info.torrents || 0 : 0) + (b.info ? b.info.torrents || 0 : 0), 0) torrents: p2p.peersList().reduce((prev, peer) => prev + (peer.info ? peer.info.torrents || 0 : 0), 0)
}) })
}); });