no need for '|| 0'

This commit is contained in:
Feross Aboukhadijeh
2016-03-05 19:20:17 -08:00
parent 220a3f161d
commit 1b269189b7

View File

@@ -46,9 +46,9 @@ function renderTorrent (torrent, dispatch) {
// Renders the torrent name and download progress // Renders the torrent name and download progress
function renderTorrentMetadata (torrent) { function renderTorrentMetadata (torrent) {
var progress = Math.floor(100 * (torrent.progress || 0)) var progress = Math.floor(100 * torrent.progress)
var downloaded = prettyBytes(torrent.downloaded || 0) var downloaded = prettyBytes(torrent.downloaded)
var total = prettyBytes(torrent.length || 0) var total = prettyBytes(torrent.ready ? torrent.length : 0)
if (downloaded !== total) downloaded += ` / ${total}` if (downloaded !== total) downloaded += ` / ${total}`