From 481d9d4e9e5273e0fd353f4ab21eb65524f92da4 Mon Sep 17 00:00:00 2001 From: Thanaphon Frappet Date: Wed, 13 Nov 2024 11:46:43 +0700 Subject: [PATCH] refactor: handle the value of being crushed --- src/components/03_customer-management/FormEmployeeVisa.vue | 7 +++---- 1 file changed, 3 insertions(+), 4 deletions(-) diff --git a/src/components/03_customer-management/FormEmployeeVisa.vue b/src/components/03_customer-management/FormEmployeeVisa.vue index 24169bc2..38eb3095 100644 --- a/src/components/03_customer-management/FormEmployeeVisa.vue +++ b/src/components/03_customer-management/FormEmployeeVisa.vue @@ -60,8 +60,9 @@ function calculate90DayNext(currentDate: Date | null | string) { if (currentDate === null) return null; const date = - typeof currentDate === 'string' ? new Date(currentDate) : currentDate; - + typeof currentDate === 'string' + ? new Date(currentDate) + : new Date(currentDate.getTime()); date.setDate(date.getDate() + 90); return date; @@ -122,8 +123,6 @@ watch(