From 630ed76b8cac05593a472dfbf0455996b6ab2652 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 28 Oct 2020 09:52:07 -1000 Subject: [PATCH] standard --- src/renderer/controllers/torrent-list-controller.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/renderer/controllers/torrent-list-controller.js b/src/renderer/controllers/torrent-list-controller.js index 05345c39..00c6f35d 100644 --- a/src/renderer/controllers/torrent-list-controller.js +++ b/src/renderer/controllers/torrent-list-controller.js @@ -160,7 +160,7 @@ module.exports = class TorrentListController { .filter((torrent) => { // We're interested in active torrents only. return (['downloading', 'seeding'].indexOf(torrent.status) !== -1) }) - .map((torrent) => { // Pause all active torrents except the one that started playing. + .forEach((torrent) => { // Pause all active torrents except the one that started playing. if (infoHash === torrent.infoHash) return // Pause torrent without playing sounds. @@ -175,7 +175,7 @@ module.exports = class TorrentListController { resumePausedTorrents () { console.log('Playback Priority: resuming paused torrents') if (!this.state.saved.torrentsToResume || !this.state.saved.torrentsToResume.length) return - this.state.saved.torrentsToResume.map((infoHash) => { + this.state.saved.torrentsToResume.forEach((infoHash) => { this.toggleTorrent(infoHash) })