Changed sort to toSorted
This commit is contained in:
@@ -97,7 +97,7 @@ export const useCalendar = defineStore("calendar", () => {
|
|||||||
/**
|
/**
|
||||||
* Sorted month data using the raw months
|
* 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 monthsPerYear = computed<number>(() => months.value.length)
|
||||||
const daysPerYear = computed<number>(() => months.value.reduce((acc, o) => acc + o.days, 0))
|
const daysPerYear = computed<number>(() => months.value.reduce((acc, o) => acc + o.days, 0))
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user