diff --git a/src/app/download-page.js b/src/app/download-page.js index 2b5554b..781d788 100644 --- a/src/app/download-page.js +++ b/src/app/download-page.js @@ -43,7 +43,7 @@ export default class TopPage extends Page { { window.router('/') }} /> - + { this.downloads.map((download, index) => { return diff --git a/src/app/torrent.js b/src/app/torrent.js index 75be720..439a4ef 100644 --- a/src/app/torrent.js +++ b/src/app/torrent.js @@ -218,7 +218,10 @@ export default class Torrent extends Component { } render() { - const torrent = this.props.torrent; + const torrent = this.props.torrent; + if(!torrent) + return null // can try draw null torrent (for example on downloading not started) + let torrentRating = -1 if(torrent.good > 0 || torrent.bad > 0) torrentRating = Math.round(rating(torrent.good, torrent.bad) * 100); diff --git a/src/background/api.js b/src/background/api.js index 934ac04..f5a5516 100644 --- a/src/background/api.js +++ b/src/background/api.js @@ -626,6 +626,7 @@ module.exports = async ({ torrentClient.remove(id, (err) => { if(err) { + console.log('download removing error', err) if(callback) callback(false) return