Fixed loading error with calendar store

This commit is contained in:
Alexis
2024-05-18 15:45:17 +02:00
parent 059edd6fc1
commit 471df5e559
5 changed files with 53 additions and 56 deletions

View File

@@ -256,7 +256,11 @@ export const useCalendar = defineStore('calendar', () => {
*/
function getMonthName(monthNumber: number): string {
const index = Number(monthNumber)
return sortedMonths.value[index].name
if (sortedMonths.value[index]) {
return sortedMonths.value[index].name
}
return ''
}
/**