Skip to content
Permalink
Browse files

Merge pull request #11871 from NotTsunami/bitwise

WebUI: Use correct operators in logical expressions
  • Loading branch information
Chocobo1 committed Jan 14, 2020
2 parents 146e821 + 8204710 commit e27c9bd0209255ef42b63e6c9a68e34a49f9a51e
Showing with 5 additions and 5 deletions.
  1. +5 −5 src/webui/www/private/scripts/dynamicTable.js
@@ -1206,23 +1206,23 @@ 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':
if (state != 'uploading' && state != 'forcedUP' && state != 'stalledUP' && state != 'queuedUP' && state != 'checkingUP')
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();

0 comments on commit e27c9bd

Please sign in to comment.
You can’t perform that action at this time.