Skip to content

Commit

Permalink
fix: reverse sorted posts in archive
Browse files Browse the repository at this point in the history
  • Loading branch information
YunYouJun committed Feb 10, 2024
1 parent 485ae82 commit 7a4533e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/valaxy-theme-yun/components/YunPostCollapse.vue
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ const isDesc = ref(true)
const sortedYears = computed(() => {
const y = years.value
const arr = y.sort((a, b) => b - a)
return isDesc.value ? arr : arr.reverse()
return isDesc.value ? arr : [...arr].reverse()
})
</script>

Expand Down

1 comment on commit 7a4533e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🎉 Published on https://yun.valaxy.site as production
🚀 Deployed on https://65c6eda05b047024119f0557--valaxy.netlify.app

Please sign in to comment.