torrent-list: client always exists now

This commit is contained in:
Feross Aboukhadijeh
2016-03-03 16:29:16 -08:00
parent 36b242cc72
commit a188b6caaf

View File

@@ -4,11 +4,7 @@ var h = require('virtual-dom/h')
var prettyBytes = require('pretty-bytes')
function TorrentList (state, dispatch) {
var torrents = state.view.client
? state.view.client.torrents
: []
var list = torrents.map(function (torrent) {
var list = state.view.client.torrents.map(function (torrent) {
var style = {}
if (torrent.posterURL) {
style['background-image'] = 'linear-gradient(to bottom, rgba(0, 0, 0, 0.5) 0%, rgba(0, 0, 0, 0) 100%), url("' + torrent.posterURL + '")'