fix file page crashing when navigating from repost link on trasaction list
This commit is contained in:
parent
ba9e26a8cc
commit
28ce9a4c90
1 changed files with 4 additions and 3 deletions
|
@ -27,9 +27,10 @@ class FileDetails extends PureComponent<Props> {
|
|||
const { description, languages, license } = metadata;
|
||||
|
||||
const mediaType = contentType || 'unknown';
|
||||
const fileSize = metadata.source.size
|
||||
? formatBytes(metadata.source.size)
|
||||
: fileInfo && fileInfo.download_path && formatBytes(fileInfo.written_bytes);
|
||||
const fileSize =
|
||||
metadata.source && metadata.source.size
|
||||
? formatBytes(metadata.source.size)
|
||||
: fileInfo && fileInfo.download_path && formatBytes(fileInfo.written_bytes);
|
||||
let downloadPath = fileInfo && fileInfo.download_path ? path.normalize(fileInfo.download_path) : null;
|
||||
let downloadNote;
|
||||
// If the path is blank, file is not available. Streamed files won't have any blobs saved
|
||||
|
|
Loading…
Add table
Reference in a new issue