From 448d937c15b0f67b30304b7db8b4e37e8f0a8ff1 Mon Sep 17 00:00:00 2001 From: Chocobo1 Date: Sun, 9 Jul 2017 22:25:29 +0800 Subject: [PATCH] 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']);