From 7444227c9a024ef4759f6d2ae360e96431dd404a Mon Sep 17 00:00:00 2001 From: NotTsunami <4589807+NotTsunami@users.noreply.github.com> Date: Mon, 13 Jan 2020 01:35:38 -0500 Subject: [PATCH] WebUI: Use correct operators in logical expressions As suggested in https://github.com/qbittorrent/qBittorrent/pull/11825#discussion_r365557626 --- src/webui/www/private/scripts/dynamicTable.js | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/src/webui/www/private/scripts/dynamicTable.js b/src/webui/www/private/scripts/dynamicTable.js index 1916fe203..b1db816cd 100644 --- a/src/webui/www/private/scripts/dynamicTable.js +++ b/src/webui/www/private/scripts/dynamicTable.js @@ -1206,7 +1206,7 @@ window.qBittorrent.DynamicTable = (function() { switch (filterName) { case 'downloading': - if (state != 'downloading' && !~state.indexOf('DL')) + if ((state != 'downloading') && (state.indexOf('DL') === -1)) return false; break; case 'seeding': @@ -1214,15 +1214,15 @@ window.qBittorrent.DynamicTable = (function() { return false; break; case 'completed': - if (state != 'uploading' && !~state.indexOf('UP')) + if ((state != 'uploading') && (state.indexOf('UP') === -1)) return false; break; case 'paused': - if (!~state.indexOf('paused')) + if (state.indexOf('paused') === -1) return false; break; case 'resumed': - if (~state.indexOf('paused')) + if (state.indexOf('paused') > -1) return false; break; case 'inactive': @@ -1338,7 +1338,7 @@ window.qBittorrent.DynamicTable = (function() { this._this.selectRow(this.rowId); const row = this._this.rows.get(this.rowId); const state = row['full_data'].state; - if (~state.indexOf('paused')) + if (state.indexOf('paused') > -1) startFN(); else pauseFN();