projects
/
archive
/
20170607
/
tools
/
tic.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
| inline |
side by side
(parent:
9340543
)
[TIC-Web] fix the Util.bytesToSize
33/119033/1
author
ChangHyun Lee
<leechwin.lee@samsung.com>
Wed, 15 Mar 2017 07:50:58 +0000
(16:50 +0900)
committer
ChangHyun Lee
<leechwin.lee@samsung.com>
Wed, 15 Mar 2017 07:50:58 +0000
(16:50 +0900)
- Consider if bytes is a character
Change-Id: I8dfa4eadfd4324af545ac7c93ef1fd3510d8f890
Signed-off-by: ChangHyun Lee <leechwin.lee@samsung.com>
public/src/js/util.js
patch
|
blob
|
history
diff --git
a/public/src/js/util.js
b/public/src/js/util.js
index
2a6fcd5
..
c83d5dc
100644
(file)
--- a/
public/src/js/util.js
+++ b/
public/src/js/util.js
@@
-99,7
+99,7
@@
define([
function bytesToSize(bytes) {
var sizes = ['Bytes', 'KB', 'MB', 'GB', 'TB'];
- if (bytes === 0) {
+ if (bytes === 0
|| bytes === '0'
) {
return '0 Byte';
}
var i = parseInt(Math.floor(Math.log(bytes) / Math.log(1024)));