From 8278d9ddffac5e65149a6f31ae5b428335f00eaa Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Tue, 4 Mar 2025 11:00:11 +0700 Subject: [PATCH] fix year --- src/controllers/ProfileController.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index dd9f8090..650bd4f5 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -1075,8 +1075,7 @@ export class ProfileController extends Controller { discipline_raw.length > 0 ? discipline_raw.slice(-2).map((item) => ({ disciplineYear: - Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()) ?? - null, + item.refCommandDate?Extension.ToThaiNumber(new Date(item.refCommandDate).getFullYear().toString()):null, disciplineDetail: item.detail ?? null, refNo: Extension.ToThaiNumber(item.refCommandNo) ?? null, }))