Skip to content

Commit

Permalink
[web] Fix error in GroupedList provoked by the linting
Browse files Browse the repository at this point in the history
  • Loading branch information
hacketiwack committed Apr 21, 2024
1 parent 06f658e commit 1ef62ac
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions web-src/src/lib/GroupedList.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const stringComparator = (a, b) => a.localeCompare(b, locale.value)
const dateComparator = (a, b) =>
new Date(a) - new Date(b) || (!a ? -1 : !b ? 1 : 0)

const createComparators = (criteria) => {
const createComparators = (criteria) =>
criteria.map(({ field, type, order = 1 }) => {
switch (type) {
case String:
Expand All @@ -18,10 +18,9 @@ const createComparators = (criteria) => {
case Date:
return (a, b) => dateComparator(a[field], b[field]) * order
default:
return null
return (a, b) => 0
}
})
}

const characterIndex = (string = '') => {
const value = string.charAt(0)
Expand Down

0 comments on commit 1ef62ac

Please sign in to comment.