diff --git a/index.js b/index.js index 15e1a72a..605144c8 100644 --- a/index.js +++ b/index.js @@ -150,6 +150,8 @@ var template = [ click: function () { var torrentIds = electron.clipboard.readText().split('\n') torrentIds.forEach(function (torrentId) { + torrentId = torrentId.trim() + if (torrentId.length === 0) return mainWindow.send('action', 'addTorrent', torrentId) }) }