diff --git a/deluge/ui/web/js/deluge-bars.js b/deluge/ui/web/js/deluge-bars.js index cf93c4d27..8e3909620 100644 --- a/deluge/ui/web/js/deluge-bars.js +++ b/deluge/ui/web/js/deluge-bars.js @@ -349,13 +349,21 @@ Deluge.SideBar = { renderer: function(value, p, r) { var lname = value.toLowerCase().replace('.', '_'); - var image = ''; + var image = ''; if (r.store.id == 'tracker_host') { if (value != 'Error') { image = String.format('url(/tracker/{0})', value); + } else { + lname = null; } } - return String.format('
{0} ({1})
', value, r.data['count'], lname, image); + if (image) { + return String.format('
{0} ({1})
', value, r.data['count'], image); + } else if (lname) { + return String.format('
{0} ({1})
', value, r.data['count'], lname); + } else { + return String.format('
{0} ({1})
', value, r.data['count']); + } }, getFilters: function() {