From 0941d74d528fa910df2061f2f5782c83621ff8e9 Mon Sep 17 00:00:00 2001 From: wbuezas Date: Tue, 9 Apr 2024 09:14:41 -0300 Subject: [PATCH] Move default value assignment --- src/pages/Worker/Card/WorkerCalendarFilter.vue | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) 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());