diff --git a/deluge/ui/web/js/deluge-torrents.js b/deluge/ui/web/js/deluge-torrents.js index 7e9593f2c..8f12147e9 100644 --- a/deluge/ui/web/js/deluge-torrents.js +++ b/deluge/ui/web/js/deluge-torrents.js @@ -53,11 +53,19 @@ function progress(value, p, r) { } function seeds(value, p, r) { - return String.format("{0} ({1})", value, r.data['total_seeds']); + if (r.data['total_seeds'] > -1) { + return String.format("{0} ({1})", value, r.data['total_seeds']); + } else { + return value; + } } function peers(value, p, r) { - return String.format("{0} ({1})", value, r.data['total_peers']); + if (r.data['total_peers'] > -1) { + return String.format("{0} ({1})", value, r.data['total_peers']); + } else { + return value; + } } function avail(value) {