Skip tracker status with no value yet

This commit is contained in:
shortcutme 2018-10-08 15:34:40 +02:00
parent 29964aa90c
commit 12dab27729
No known key found for this signature in database
GPG key ID: 5B63BAE6CB9613AE
2 changed files with 5 additions and 3 deletions

View file

@ -530,7 +530,8 @@ class Wrapper
setAnnouncerInfo: (announcer_info) ->
status_db = {announcing: [], error: [], announced: []}
for key, val of announcer_info.stats
status_db[val.status].push(val)
if val.status
status_db[val.status].push(val)
status_line = "Trackers announcing: #{status_db.announcing.length}, error: #{status_db.error.length}, done: #{status_db.announced.length}"
if @announcer_line
@announcer_line.text(status_line)

View file

@ -50,7 +50,6 @@
}).call(this);
/* ---- src/Ui/media/lib/ZeroWebsocket.coffee ---- */
@ -1623,7 +1622,9 @@ jQuery.extend( jQuery.easing,
ref = announcer_info.stats;
for (key in ref) {
val = ref[key];
status_db[val.status].push(val);
if (val.status) {
status_db[val.status].push(val);
}
}
status_line = "Trackers announcing: " + status_db.announcing.length + ", error: " + status_db.error.length + ", done: " + status_db.announced.length;
if (this.announcer_line) {