From 5d91ed91e4a5c1167de84c1617644dc5ff06f972 Mon Sep 17 00:00:00 2001 From: kittapath Date: Fri, 29 Nov 2024 14:16:29 +0700 Subject: [PATCH] =?UTF-8?q?=E0=B9=80=E0=B8=8A=E0=B9=87=E0=B8=95=E0=B9=80?= =?UTF-8?q?=E0=B8=A5=E0=B8=82=E0=B8=9A=E0=B8=B1=E0=B8=95=E0=B8=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- src/interfaces/extension.ts | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/src/interfaces/extension.ts b/src/interfaces/extension.ts index 8a168442..5856f98e 100644 --- a/src/interfaces/extension.ts +++ b/src/interfaces/extension.ts @@ -230,9 +230,7 @@ class Extension { public static ToThaiShortYear(value: Date) { let yy = value.getFullYear() < 2400 ? value.getFullYear() + 543 : value.getFullYear(); - return ( - yy.toString() - ); + return yy.toString(); } public static sumObjectValues(array: any, propertyName: any) { @@ -247,6 +245,9 @@ class Extension { public static CheckCitizen(value: string) { let citizen = value; + if (citizen == null || citizen == "") { + return citizen; + } if (citizen.length !== 13) { throw new HttpError( HttpStatus.NOT_FOUND,