From 657285ea6f29031bdcc34077b2cef634d4c4d5de Mon Sep 17 00:00:00 2001 From: AdisakKanthawilang Date: Thu, 17 Jul 2025 14:23:20 +0700 Subject: [PATCH] update checkcitizen --- src/controllers/ProfileController.ts | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) diff --git a/src/controllers/ProfileController.ts b/src/controllers/ProfileController.ts index 341b4201..cf8a4404 100644 --- a/src/controllers/ProfileController.ts +++ b/src/controllers/ProfileController.ts @@ -5080,10 +5080,8 @@ export class ProfileController extends Controller { citizenIdDigits[11] * 2; const calStp2 = cal % 11; let chkDigit = 11 - calStp2; - if (chkDigit === 10) { - chkDigit = 1; - } else if (chkDigit === 11) { - chkDigit = chkDigit % 10; + if (chkDigit >= 10) { + chkDigit = 0; } if (citizenIdDigits[12] !== chkDigit) {