[web] Remove ternary conditional operator

This commit is contained in:
Alain Nussbaumer 2024-03-12 14:04:05 +01:00
parent 2273b917c7
commit b59a1b9407

View File

@ -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)