diff --git a/src/webui/www/private/scripts/mocha-init.js b/src/webui/www/private/scripts/mocha-init.js index d07c10519..4e71f83a7 100644 --- a/src/webui/www/private/scripts/mocha-init.js +++ b/src/webui/www/private/scripts/mocha-init.js @@ -963,7 +963,7 @@ const initializeWindows = function() { for (const hash of hashes) { const row = torrentsTable.rows.get(hash); if (!row) - return; + continue; const name = row.full_data.name; const url = new URI("api/v2/torrents/export"); @@ -972,7 +972,7 @@ const initializeWindows = function() { // download response to file const element = document.createElement("a"); element.setAttribute("href", url); - element.setAttribute("download", name + ".torrent"); + element.setAttribute("download", (name + ".torrent")); document.body.appendChild(element); element.click(); document.body.removeChild(element);