fix ?files failing to load after publish

This commit is contained in:
Jeremy Kauffman 2016-07-26 09:02:28 -04:00
parent f191ddf623
commit 7c418c0ea6

View file

@ -146,6 +146,13 @@ var MyFilesPage = React.createClass({
for (let fileInfo of this.state.filesInfo) { for (let fileInfo of this.state.filesInfo) {
let {completed, written_bytes, total_bytes, lbry_uri, file_name, download_path, let {completed, written_bytes, total_bytes, lbry_uri, file_name, download_path,
stopped, metadata} = fileInfo; stopped, metadata} = fileInfo;
if (!metadata)
{
console.log('Empty metadata, skipping render');
continue;
}
let {title, thumbnail} = metadata; let {title, thumbnail} = metadata;
var ratioLoaded = written_bytes / total_bytes; var ratioLoaded = written_bytes / total_bytes;