state.client.torrents will always exist
This commit is contained in:
@@ -6,11 +6,7 @@ var hx = hyperx(h)
|
|||||||
var prettyBytes = require('pretty-bytes')
|
var prettyBytes = require('pretty-bytes')
|
||||||
|
|
||||||
function TorrentList (state, dispatch) {
|
function TorrentList (state, dispatch) {
|
||||||
var torrents = state.client
|
var list = state.client.torrents.map((torrent) => renderTorrent(torrent, dispatch))
|
||||||
? state.client.torrents
|
|
||||||
: []
|
|
||||||
|
|
||||||
var list = torrents.map((torrent) => renderTorrent(torrent, dispatch))
|
|
||||||
return hx`<div class="torrent-list">${list}</div>`
|
return hx`<div class="torrent-list">${list}</div>`
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user