Changed sort to toSorted

This commit is contained in:
Alexis
2025-05-07 14:12:21 +02:00
parent 114e235a93
commit 63d5ba2224

View File

@@ -97,7 +97,7 @@ export const useCalendar = defineStore("calendar", () => {
/**
* Sorted month data using the raw months
*/
const sortedMonths = computed<CalendarMonth[]>(() => months.value.sort((a, b) => a.position - b.position))
const sortedMonths = computed<CalendarMonth[]>(() => months.value.toSorted((a, b) => a.position - b.position))
const monthsPerYear = computed<number>(() => months.value.length)
const daysPerYear = computed<number>(() => months.value.reduce((acc, o) => acc + o.days, 0))