From c287960fa81cf617fddc37c1a5ab8415f5b339e1 Mon Sep 17 00:00:00 2001 From: Carl Monnig Date: Fri, 4 Jan 2013 23:23:46 +0200 Subject: [PATCH] Fixed undefined error when downloading BitTorrent Magnet links. --- js/script.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/js/script.js b/js/script.js index 2ce074a..2177817 100755 --- a/js/script.js +++ b/js/script.js @@ -365,7 +365,7 @@ function getTemplateCtx(data) { var name; var seed = (data.files[0].path || data.files[0].uris[0].uri).split(/[/\\]/); name = seed[seed.length - 1]; - if (data.bittorrent) { + if (data.bittorrent && data.bittorrent.info) { name = data.bittorrent.info.name; } var chunks = percentage !== 100 && data.bitfield ? getChunksFromHex(data.bitfield, data.numPieces) : [];