Skip to content

Commit

Permalink
Correct sorting for edge cases
Browse files Browse the repository at this point in the history
  • Loading branch information
carlobeltrame committed Feb 1, 2024
1 parent 9aea49f commit ee33de4
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion frontend/src/components/story/StoryDay.vue
Original file line number Diff line number Diff line change
Expand Up @@ -80,7 +80,12 @@ export default {
})
},
sortedScheduleEntries() {
return sortBy(this.scheduleEntries, (scheduleEntry) => scheduleEntry.start)
return sortBy(this.scheduleEntries, [
(scheduleEntry) => new Date(scheduleEntry.start),
'left',
(scheduleEntry) => -new Date(scheduleEntry.end),
'id',
])
},
entries() {
return this.sortedScheduleEntries.map((scheduleEntry) => ({
Expand Down

0 comments on commit ee33de4

Please sign in to comment.