diff --git a/src/pages/Worker/Card/WorkerCalendarFilter.vue b/src/pages/Worker/Card/WorkerCalendarFilter.vue index 7b13aee12..ff657cef0 100644 --- a/src/pages/Worker/Card/WorkerCalendarFilter.vue +++ b/src/pages/Worker/Card/WorkerCalendarFilter.vue @@ -57,7 +57,7 @@ const generateYears = () => { const now = Date.vnNew(); const maxYear = now.getFullYear() + 1; - return Array.from({ length: 5 }, (_, i) => String(maxYear - i)); + return Array.from({ length: 5 }, (_, i) => String(maxYear - i)) || []; }; const absenceTypeList = ref([]); @@ -142,7 +142,7 @@ const yearList = ref(generateYears());