diff --git a/skins/base/views/molecules/MFileTile.js b/skins/base/views/molecules/MFileTile.js index 712656b406..c54c02ae09 100644 --- a/skins/base/views/molecules/MFileTile.js +++ b/skins/base/views/molecules/MFileTile.js @@ -17,7 +17,6 @@ limitations under the License. 'use strict'; var React = require('react'); -var filesize = require('filesize'); var MFileTileController = require("../../../../src/controllers/molecules/MFileTile"); diff --git a/src/controllers/molecules/MFileTile.js b/src/controllers/molecules/MFileTile.js index 68b1983b4b..7b5515fa3e 100644 --- a/src/controllers/molecules/MFileTile.js +++ b/src/controllers/molecules/MFileTile.js @@ -16,6 +16,8 @@ limitations under the License. 'use strict'; +var filesize = require('filesize'); + module.exports = { presentableTextForFile: function(content) { var linkText = 'Attachment'; @@ -28,7 +30,7 @@ module.exports = { if (content.info.mimetype && content.info.mimetype.length > 0) { additionals.push(content.info.mimetype); } - if (content.info.size && content.info.size.length > 0) { + if (content.info.size) { additionals.push(filesize(content.info.size)); } }