diff --git a/src/torrent_state.js b/src/torrent_state.js index ce30464..b4128d9 100644 --- a/src/torrent_state.js +++ b/src/torrent_state.js @@ -12,7 +12,6 @@ export function activeTorrents() { } } -// TODO: invoke on page load for /torrents/:id export function updateSubscriptions(added, removed) { if (added.length > 0) { added.forEach(t => { diff --git a/src/ui/torrent_details.js b/src/ui/torrent_details.js index b2238f4..1df01ea 100644 --- a/src/ui/torrent_details.js +++ b/src/ui/torrent_details.js @@ -70,6 +70,12 @@ class Torrent extends Component { const { torrent, files } = this.props; const status = s => s[0].toUpperCase() + s.slice(1); + if (!torrent || !files) { + return ( +
Loading...
+ ); + } + return (