fixup! fix: sonarcloud code smells (#2623) (#2666)

fix oops in web client torrent filtering
This commit is contained in:
Charles Kerr 2022-02-20 21:38:09 -06:00 committed by GitHub
parent 69e5b265a4
commit f436d742a2
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -395,7 +395,9 @@ export class Torrent extends EventTarget {
if (pass) {
// pass if this torrent has any of these labels
const torrent_labels = this.getLabels();
pass = labels.some((label) => torrent_labels.includes(label));
if (torrent_labels.length > 0) {
pass = labels.some((label) => torrent_labels.includes(label));
}
}
// maybe filter by tracker...