From a591b6673235d4770087ad67b1beecb2e2aa443c Mon Sep 17 00:00:00 2001 From: David Baker Date: Wed, 8 Jul 2015 16:50:49 +0100 Subject: [PATCH] Don't barf if no info in m.file content --- src/controllers/molecules/MFileTile.js | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/src/controllers/molecules/MFileTile.js b/src/controllers/molecules/MFileTile.js index a0e0cc3413..68b1983b4b 100644 --- a/src/controllers/molecules/MFileTile.js +++ b/src/controllers/molecules/MFileTile.js @@ -24,11 +24,13 @@ module.exports = { } var additionals = []; - if (content.info.mimetype && content.info.mimetype.length > 0) { - additionals.push(content.info.mimetype); - } - if (content.info.size && content.info.size.length > 0) { - additionals.push(filesize(content.info.size)); + if (content.info) { + if (content.info.mimetype && content.info.mimetype.length > 0) { + additionals.push(content.info.mimetype); + } + if (content.info.size && content.info.size.length > 0) { + additionals.push(filesize(content.info.size)); + } } if (additionals.length > 0) {