state.client.torrents will always exist

This commit is contained in:
Feross Aboukhadijeh
2016-03-05 16:26:05 -08:00
parent 098827ec78
commit a38b27876b

View File

@@ -6,11 +6,7 @@ var hx = hyperx(h)
var prettyBytes = require('pretty-bytes')
function TorrentList (state, dispatch) {
var torrents = state.client
? state.client.torrents
: []
var list = torrents.map((torrent) => renderTorrent(torrent, dispatch))
var list = state.client.torrents.map((torrent) => renderTorrent(torrent, dispatch))
return hx`<div class="torrent-list">${list}</div>`
}