Skip to content

Commit

Permalink
sort entities by: claim layout case: work around default sorting with…
Browse files Browse the repository at this point in the history
… strictier typing
  • Loading branch information
jum-s committed Feb 14, 2024
1 parent 4eb7720 commit 962e5b9
Showing 1 changed file with 8 additions and 3 deletions.
11 changes: 8 additions & 3 deletions app/modules/entities/components/layouts/sort_entities_by.svelte
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,14 @@
export let sortingType = 'work', entities, waitingForItems
const optionsByName = getSortingOptionsByName(sortingType)
const options = Object.values(optionsByName)
let sortingName = Object.keys(optionsByName)?.[0]
const optionsByName = getSortingOptionsByName(sortingType) || {}
let options, sortingName
if (optionsByName) {
options = Object.values(optionsByName)
sortingName = Object.keys(optionsByName)?.[0]
}
let initialSorting = true
$: option = optionsByName[sortingName]
Expand Down

0 comments on commit 962e5b9

Please sign in to comment.