From 161d0297ecb3660abee599a79454840661332f18 Mon Sep 17 00:00:00 2001 From: Feross Aboukhadijeh Date: Wed, 2 Mar 2016 15:57:46 -0800 Subject: [PATCH] handle pasting a line that ends in /n better --- index.js | 2 ++ 1 file changed, 2 insertions(+) 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) }) }