From 448d937c15b0f67b30304b7db8b4e37e8f0a8ff1 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 9 Jul 2017 22:25:29 +0800 Subject: [PATCH 1/2] Fix value comparison. Closes #7081. `category` could be 'undefined'. Fixup of a7f4ea8b185b4866134ea396d1bec9ffaf6d16c5. --- src/webui/www/public/scripts/client.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/public/scripts/client.js b/src/webui/www/public/scripts/client.js index 69a931c1a..12022887e 100644 --- a/src/webui/www/public/scripts/client.js +++ b/src/webui/www/public/scripts/client.js @@ -184,7 +184,7 @@ window.addEvent('load', function () { var addTorrentToCategoryList = function(torrent) { var category = torrent['category']; - if (category === null) + if (typeof category === 'undefined') return false; if (category.length === 0) { // Empty category removeTorrentFromCategoryList(torrent['hash']); From be61e8f2fd72a6bab9038e39a9c4c2c15b9fa8ab Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Mon, 10 Jul 2017 00:36:56 +0800 Subject: [PATCH 2/2] Revert back to intended fallthrough Partial revert a7f4ea8b185b4866134ea396d1bec9ffaf6d16c5 --- src/webui/www/public/scripts/dynamicTable.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/webui/www/public/scripts/dynamicTable.js b/src/webui/www/public/scripts/dynamicTable.js index 4d58e6719..9f3150bc5 100644 --- a/src/webui/www/public/scripts/dynamicTable.js +++ b/src/webui/www/public/scripts/dynamicTable.js @@ -1039,7 +1039,7 @@ var TorrentsTable = new Class({ break; case 'inactive': inactive = true; - break; + // fallthrough case 'active': if (state == 'stalledDL') r = (row['full_data'].upspeed > 0);