summaryrefslogtreecommitdiff
path: root/animism-align/frontend/app/utils/index.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2021-03-11 14:38:02 +0100
committerJules Laplace <julescarbon@gmail.com>2021-03-11 14:38:02 +0100
commit37896f6960f8145a13e2943fbb0cde52da430d30 (patch)
tree40cb7ca2a6b470dc397dd0ba99998ad899a212b0 /animism-align/frontend/app/utils/index.js
parent64cd37eae81845dc5eaace17739a72299cfc6c67 (diff)
move sidebar and timeline out of align folder
Diffstat (limited to 'animism-align/frontend/app/utils/index.js')
-rw-r--r--animism-align/frontend/app/utils/index.js1
1 files changed, 1 insertions, 0 deletions
diff --git a/animism-align/frontend/app/utils/index.js b/animism-align/frontend/app/utils/index.js
index d76a319..dc80fee 100644
--- a/animism-align/frontend/app/utils/index.js
+++ b/animism-align/frontend/app/utils/index.js
@@ -82,6 +82,7 @@ export const timestamp = (n = 0, fps = 1, ms = false, h_label = ':', m_label = '
}
export const formatSize = n => {
+ if (!n) return "Empty"
if (n < 1000) return n + " b."
if (n < 1000000) return (n / 1000).toFixed(1) + " kb."
if (n < 1000000000) return (n / 1000000).toFixed(1) + " mb."