[web] Remove ternary conditional operator
This commit is contained in:
parent
2273b917c7
commit
b59a1b9407
|
@ -125,9 +125,9 @@ export class GroupedList {
|
|||
)
|
||||
this.count = itemsFiltered.length
|
||||
// Sort item list
|
||||
const itemsSorted = options.compareFn
|
||||
? [...itemsFiltered].sort(options.compareFn)
|
||||
: itemsFiltered
|
||||
const itemsSorted = [...itemsFiltered].sort(
|
||||
options.compareFn ?? (() => true)
|
||||
)
|
||||
// Group item list
|
||||
this.itemsGrouped = itemsSorted.reduce((map, item) => {
|
||||
const groupKey = options.groupKeyFn(item)
|
||||
|
|
Loading…
Reference in New Issue