Fixed undefined error when downloading BitTorrent Magnet links.
This commit is contained in:
parent
36f280ada0
commit
c287960fa8
|
@ -365,7 +365,7 @@ function getTemplateCtx(data) {
|
||||||
var name;
|
var name;
|
||||||
var seed = (data.files[0].path || data.files[0].uris[0].uri).split(/[/\\]/);
|
var seed = (data.files[0].path || data.files[0].uris[0].uri).split(/[/\\]/);
|
||||||
name = seed[seed.length - 1];
|
name = seed[seed.length - 1];
|
||||||
if (data.bittorrent) {
|
if (data.bittorrent && data.bittorrent.info) {
|
||||||
name = data.bittorrent.info.name;
|
name = data.bittorrent.info.name;
|
||||||
}
|
}
|
||||||
var chunks = percentage !== 100 && data.bitfield ? getChunksFromHex(data.bitfield, data.numPieces) : [];
|
var chunks = percentage !== 100 && data.bitfield ? getChunksFromHex(data.bitfield, data.numPieces) : [];
|
||||||
|
|
Loading…
Reference in New Issue
Block a user