summaryrefslogtreecommitdiff
path: root/app/client/util/sort.js
diff options
context:
space:
mode:
authorJules Laplace <julescarbon@gmail.com>2018-06-03 14:46:18 +0200
committerJules Laplace <julescarbon@gmail.com>2018-06-03 14:46:18 +0200
commita450fa75edb927b7568b8a3198f9209c6a4c7f79 (patch)
tree67a9baa716c6f12f2ed3a8e4ba69e942fb309687 /app/client/util/sort.js
parent198c41778cfe39d37aab92c08325dc8c9d4437a0 (diff)
adjusting the form, calling samplernn tasks
Diffstat (limited to 'app/client/util/sort.js')
-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
}