summaryrefslogtreecommitdiff
path: root/app/client/util
diff options
context:
space:
mode:
Diffstat (limited to 'app/client/util')
-rw-r--r--app/client/util/sort.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/app/client/util/sort.js b/app/client/util/sort.js
index cc1b462..78f17a0 100644
--- a/app/client/util/sort.js
+++ b/app/client/util/sort.js
@@ -15,7 +15,7 @@ export const orderByFn = (s='name asc') => {
sortFn = numericSort[direction]
break
case 'size':
- mapFn = a => [a.size, a]
+ mapFn = a => [parseInt(a.size) || 0, a]
sortFn = numericSort[direction]
break
case 'date':
@@ -24,7 +24,7 @@ export const orderByFn = (s='name asc') => {
break
case 'name':
default:
- mapFn = a => [a.id || a.name, a]
+ mapFn = a => [a.name || "", a]
sortFn = stringSort[direction]
break
}