Skip to content

Commit 6a92fdc

Browse files
committed
Fix file size display
1 parent 03451d8 commit 6a92fdc

2 files changed

Lines changed: 3 additions & 2 deletions

File tree

‎skins/base/views/molecules/MFileTile.js‎

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ limitations under the License.
1717
'use strict';
1818

1919
var React = require('react');
20-
var filesize = require('filesize');
2120

2221
var MFileTileController = require("../../../../src/controllers/molecules/MFileTile");
2322

‎src/controllers/molecules/MFileTile.js‎

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,8 @@ limitations under the License.
1616

1717
'use strict';
1818

19+
var filesize = require('filesize');
20+
1921
module.exports = {
2022
presentableTextForFile: function(content) {
2123
var linkText = 'Attachment';
@@ -28,7 +30,7 @@ module.exports = {
2830
if (content.info.mimetype && content.info.mimetype.length > 0) {
2931
additionals.push(content.info.mimetype);
3032
}
31-
if (content.info.size && content.info.size.length > 0) {
33+
if (content.info.size) {
3234
additionals.push(filesize(content.info.size));
3335
}
3436
}

0 commit comments

Comments
 (0)