mirror of
https://github.com/zoriya/flood.git
synced 2026-06-02 02:56:05 +00:00
Switch entirely to fat arrow functions
This commit is contained in:
@@ -130,16 +130,16 @@ export default class StatusFilters extends React.Component {
|
||||
let totalStatusCount = 0;
|
||||
let torrents = TorrentStore.getAllTorrents();
|
||||
|
||||
Object.keys(statusCount).forEach(function(key) {
|
||||
Object.keys(statusCount).forEach((key) => {
|
||||
statusCount[key] = 0;
|
||||
});
|
||||
|
||||
Object.keys(torrents).forEach(function(hash) {
|
||||
Object.keys(torrents).forEach((hash) => {
|
||||
let torrent = torrents[hash];
|
||||
|
||||
if (torrent.trackers.indexOf(trackerFilter) > -1) {
|
||||
totalStatusCount++;
|
||||
torrent.status.forEach(function (status) {
|
||||
torrent.status.forEach((status) => {
|
||||
statusCount[propsMap.serverStatus[status]]++;
|
||||
});
|
||||
}
|
||||
|
||||
@@ -95,16 +95,16 @@ export default class TrackerFilters extends React.Component {
|
||||
let torrentCount = 0;
|
||||
let torrents = TorrentStore.getAllTorrents();
|
||||
|
||||
Object.keys(trackerCount).forEach(function(key) {
|
||||
Object.keys(trackerCount).forEach((key) => {
|
||||
trackerCount[key] = 0;
|
||||
});
|
||||
|
||||
Object.keys(torrents).forEach(function(hash) {
|
||||
Object.keys(torrents).forEach((hash) => {
|
||||
let torrent = torrents[hash];
|
||||
|
||||
if (torrent.status.indexOf(propsMap.clientStatus[statusFilter]) > -1) {
|
||||
torrentCount++;
|
||||
torrent.trackers.forEach(function (tracker) {
|
||||
torrent.trackers.forEach((tracker) => {
|
||||
trackerCount[tracker]++;
|
||||
});
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user