From 7108e65cf6859d2c614b9067ed02a906572a907c Mon Sep 17 00:00:00 2001 From: Chris Duncan Date: Wed, 13 Aug 2025 08:04:33 -0700 Subject: [PATCH] Use ternary operator instead of casting bool to int. --- src/lib/crypto/nano-nacl.ts | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/src/lib/crypto/nano-nacl.ts b/src/lib/crypto/nano-nacl.ts index 36ee056..e23bdd6 100644 --- a/src/lib/crypto/nano-nacl.ts +++ b/src/lib/crypto/nano-nacl.ts @@ -190,8 +190,7 @@ export class NanoNaCl { // the inner loop since a[x]*a[y] + a[y]*a[x] = 2*a[x]*a[y] for (let i = 0; i < 16; i++) { for (let j = i; j < 16; j++) { - //@ts-expect-error - t[i + j] += a[i] * a[j] * ((i < j) + 1) + t[i + j] += a[i] * a[j] * (i < j ? 2 : 1) } } -- 2.47.3