diff --git a/src/renderer/pages/player-page.js b/src/renderer/pages/player-page.js index 6db4d6bf..1574ee17 100644 --- a/src/renderer/pages/player-page.js +++ b/src/renderer/pages/player-page.js @@ -599,12 +599,15 @@ function renderLoadingBar (state) { const torrentSummary = state.getPlayingTorrentSummary() if (!torrentSummary.progress) { - return [] + return null } // Find all contiguous parts of the torrent which are loaded const prog = torrentSummary.progress const fileProg = prog.files[state.playing.fileIndex] + + if (!fileProg) return null + const parts = [] let lastPiecePresent = false for (let i = fileProg.startPiece; i <= fileProg.endPiece; i++) { @@ -626,6 +629,7 @@ function renderLoadingBar (state) { return (
) }) + return (