Support for instant.io links does not belong in webtorrent core

This commit is contained in:
Feross Aboukhadijeh
2016-08-11 00:20:07 -07:00
parent 0fa3b678b0
commit 563e1ca0ba

View File

@@ -24,8 +24,8 @@ module.exports = class TorrentListController {
// Use path string instead of W3C File object
torrentId = torrentId.path
}
// Allow a instant.io link to be pasted
// TODO: remove this once support is added to webtorrent core
if (typeof torrentId === 'string' && instantIoRegex.test(torrentId)) {
torrentId = torrentId.slice(torrentId.indexOf('#') + 1)
}