fix 'isMagnet' is already defined error
This commit is contained in:
@@ -549,8 +549,7 @@ function onOpen (files) {
|
|||||||
function isTorrent (file) {
|
function isTorrent (file) {
|
||||||
var name = typeof file === 'string' ? file : file.name
|
var name = typeof file === 'string' ? file : file.name
|
||||||
var isTorrentFile = path.extname(name).toLowerCase() === '.torrent'
|
var isTorrentFile = path.extname(name).toLowerCase() === '.torrent'
|
||||||
var isMagnet = typeof file === 'string' && /^magnet:/.test(file)
|
var isMagnet = typeof file === 'string' && /^magnet:/.test(file) || /^stream-magnet:/.test(file)
|
||||||
var isMagnet = typeof file === 'string' && /^stream-magnet:/.test(file)
|
|
||||||
return isTorrentFile || isMagnet
|
return isTorrentFile || isMagnet
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user