mirror of
https://github.com/qbittorrent/qBittorrent.git
synced 2025-12-17 22:18:05 -06:00
Don't use Object.prototypes builtins directly
See: https://eslint.org/docs/rules/no-prototype-builtins
This commit is contained in:
@@ -464,7 +464,7 @@ window.addEvent('load', function() {
|
||||
const torrentsCount = torrentsTable.getRowIds().length;
|
||||
let untagged = 0;
|
||||
for (const key in torrentsTable.rows) {
|
||||
if (torrentsTable.rows.hasOwnProperty(key) && torrentsTable.rows[key]['full_data'].tags.length === 0)
|
||||
if (Object.prototype.hasOwnProperty.call(torrentsTable.rows, key) && (torrentsTable.rows[key]['full_data'].tags.length === 0))
|
||||
untagged += 1;
|
||||
}
|
||||
tagFilterList.appendChild(createLink(TAGS_ALL, 'QBT_TR(All)QBT_TR[CONTEXT=TagFilterModel]', torrentsCount));
|
||||
@@ -519,7 +519,7 @@ window.addEvent('load', function() {
|
||||
trackerFilterList.appendChild(createLink(TRACKERS_ALL, 'QBT_TR(All (%1))QBT_TR[CONTEXT=TrackerFiltersList]', torrentsCount));
|
||||
let trackerlessTorrentsCount = 0;
|
||||
for (const key in torrentsTable.rows) {
|
||||
if (torrentsTable.rows.hasOwnProperty(key) && (torrentsTable.rows[key]['full_data'].trackers_count === 0))
|
||||
if (Object.prototype.hasOwnProperty.call(torrentsTable.rows, key) && (torrentsTable.rows[key]['full_data'].trackers_count === 0))
|
||||
trackerlessTorrentsCount += 1;
|
||||
}
|
||||
trackerFilterList.appendChild(createLink(TRACKERS_TRACKERLESS, 'QBT_TR(Trackerless (%1))QBT_TR[CONTEXT=TrackerFiltersList]', trackerlessTorrentsCount));
|
||||
|
||||
Reference in New Issue
Block a user