Fix file size display

This commit is contained in:
David Baker 2015-07-08 19:52:44 +01:00
parent 03451d8c7d
commit 6a92fdc5e6
2 changed files with 3 additions and 2 deletions

View File

@ -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");

View File

@ -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));
}
}