From 8f9f4810a51785dd9d5b4c30fcec8407072fe8ea Mon Sep 17 00:00:00 2001 From: Asaad Mahmood Date: Sat, 15 Aug 2015 01:17:26 +0500 Subject: Using variables efficiently --- web/react/components/file_attachment.jsx | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'web/react') diff --git a/web/react/components/file_attachment.jsx b/web/react/components/file_attachment.jsx index 5eba3a14e..a7da5218a 100644 --- a/web/react/components/file_attachment.jsx +++ b/web/react/components/file_attachment.jsx @@ -115,11 +115,11 @@ module.exports = React.createClass({ var filenameString = decodeURIComponent(utils.getFileName(filename)); var trimmedFilename; - if(filenameString.length > 35){ + if (filenameString.length > 35) { trimmedFilename = filenameString.substring(0, Math.min(35,filenameString.length)) + "..."; } else { - trimmedFilename = decodeURIComponent(utils.getFileName(filename));; + trimmedFilename = filenameString; } return ( @@ -129,7 +129,7 @@ module.exports = React.createClass({ {thumbnail}
-
{trimmedFilename}
+
{trimmedFilename}
{fileInfo.ext.toUpperCase()} {fileSizeString} -- cgit v1.2.3-1-g7c22