]> git.codecow.com Git - libnemo.git/commitdiff
Revert ternary operator to boolean cast.
authorChris Duncan <chris@zoso.dev>
Mon, 18 Aug 2025 14:59:25 +0000 (07:59 -0700)
committerChris Duncan <chris@zoso.dev>
Mon, 18 Aug 2025 14:59:25 +0000 (07:59 -0700)
src/lib/crypto/nano-nacl.ts

index f00c8e2a766f8634d384d036834568c342d65cce..7598dac3aa964b4ef032b2438cae6a7170cbe6a9 100644 (file)
@@ -200,7 +200,8 @@ export class NanoNaCl {
                // the inner loop since a[x]*a[y] + a[y]*a[x] = 2*a[x]*a[y]\r
                for (let i = 0; i < 16; i++) {\r
                        for (let j = i; j < 16; j++) {\r
-                               t[i + j] += a[i] * a[j] * (i < j ? 2 : 1)\r
+                               //@ts-expect-error\r
+                               t[i + j] += a[i] * a[j] * ((i < j) + 1)\r
                        }\r
                }\r
 \r