Switch entirely to fat arrow functions

This commit is contained in:
John Furrow
2016-03-19 12:46:11 +01:00
parent 14ed9bb1f5
commit e77dfac3ae
33 changed files with 145 additions and 159 deletions
@@ -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]++;
});
}