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,