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, }))