handle pasting a line that ends in /n better

This commit is contained in:
Feross Aboukhadijeh
2016-03-02 15:57:46 -08:00
parent c1cf9199b2
commit 161d0297ec

View File

@@ -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)
})
}