diff --git a/public/react/src/common/UnitUtil.js b/public/react/src/common/UnitUtil.js index bb3267aa4..ea4fb9e96 100644 --- a/public/react/src/common/UnitUtil.js +++ b/public/react/src/common/UnitUtil.js @@ -1,6 +1,6 @@ -export function bytesToSize(bytes) { - var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; - if (bytes == 0) return '0 Byte'; - var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024))); - return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; +export function bytesToSize(bytes) { + var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB']; + if (bytes == 0) return '0 Byte'; + var i = Math.floor(Math.log(bytes) / Math.log(1024)); + return Math.round(bytes / Math.pow(1024, i), 2) + ' ' + sizes[i]; } \ No newline at end of file diff --git a/public/react/src/modules/courses/Resource/Fileslistitem.js b/public/react/src/modules/courses/Resource/Fileslistitem.js index c778e14c7..b52efd3c1 100644 --- a/public/react/src/modules/courses/Resource/Fileslistitem.js +++ b/public/react/src/modules/courses/Resource/Fileslistitem.js @@ -233,7 +233,7 @@ class Fileslistitem extends Component{ :"" } - {discussMessage.is_publish===true?:""} + {discussMessage.is_publish===false?:""}