aboutsummaryrefslogtreecommitdiff
path: root/src/modules
diff options
context:
space:
mode:
Diffstat (limited to 'src/modules')
-rw-r--r--src/modules/helpers/luhn-check.ts2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/modules/helpers/luhn-check.ts b/src/modules/helpers/luhn-check.ts
index ba68b41d..42fbe1a5 100644
--- a/src/modules/helpers/luhn-check.ts
+++ b/src/modules/helpers/luhn-check.ts
@@ -28,7 +28,7 @@ function luhnChecksum(str: string): number {
let sum = 0;
let alternate = false;
for (let i = str.length - 1; i >= 0; i--) {
- let n = Number.parseInt(str.substring(i, i + 1));
+ let n = Number.parseInt(str[i]);
if (alternate) {
n *= 2;
if (n > 9) {