mirror of
https://github.com/DI0IK/homepage-plus.git
synced 2025-07-09 14:58:47 +00:00
Fix transmission leech and seed showing NaN
This commit is contained in:
parent
65755a08aa
commit
149ed8c266
1 changed files with 2 additions and 2 deletions
|
@ -30,8 +30,8 @@ export default function Component({ service }) {
|
|||
|
||||
const rateDl = torrents.reduce((acc, torrent) => acc + torrent.rateDownload, 0);
|
||||
const rateUl = torrents.reduce((acc, torrent) => acc + torrent.rateUpload, 0);
|
||||
const completed = torrents.filter((torrent) => torrent.percentDone === 1);
|
||||
const leech = torrents.length - completed;
|
||||
const completed = torrents.filter((torrent) => torrent.percentDone === 1)?.length || 0;
|
||||
const leech = torrents.length - completed || 0;
|
||||
|
||||
return (
|
||||
<Container>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue