Skip to content

Commit

Permalink
fix: optimize timeline sorting
Browse files Browse the repository at this point in the history
ISSUES CLOSED: #292
  • Loading branch information
recoluan committed Sep 6, 2024
1 parent e80ae97 commit e632410
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions packages/vuepress-theme-reco/src/client/layouts/Timeline.vue
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ interface TimelineData {
data: any
}
const timelineData: Array<TimelineData> = Object.keys(dataMap).reduce(
const timelineData: Array<TimelineData> = Object.keys(dataMap).sort((a, b) => b - a).reduce(
(all: Array<TimelineData>, next: string) => {
all.push({
year: next,
Expand All @@ -71,4 +71,4 @@ const timelineData: Array<TimelineData> = Object.keys(dataMap).reduce(
[]
)
</script>
@client/components/GenericContainer/index.vue

0 comments on commit e632410

Please sign in to comment.