Skip to content

Commit a591b66

Browse files
committed
Don't barf if no info in m.file content
1 parent 5bed0b7 commit a591b66

1 file changed

Lines changed: 7 additions & 5 deletions

File tree

‎src/controllers/molecules/MFileTile.js‎

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,13 @@ module.exports = {
2424
}
2525

2626
var additionals = [];
27-
if (content.info.mimetype && content.info.mimetype.length > 0) {
28-
additionals.push(content.info.mimetype);
29-
}
30-
if (content.info.size && content.info.size.length > 0) {
31-
additionals.push(filesize(content.info.size));
27+
if (content.info) {
28+
if (content.info.mimetype && content.info.mimetype.length > 0) {
29+
additionals.push(content.info.mimetype);
30+
}
31+
if (content.info.size && content.info.size.length > 0) {
32+
additionals.push(filesize(content.info.size));
33+
}
3234
}
3335

3436
if (additionals.length > 0) {

0 commit comments

Comments
 (0)