From 060b10ea2dec599032f2456bded9a170515ffb42 Mon Sep 17 00:00:00 2001 From: "Eric T. Johnson" Date: Sun, 22 Jun 2025 20:05:37 -0400 Subject: [PATCH] fix(web/js): broken progress bar with slow algo (#673) This was revealed by the reformat in #546. Signed-off-by: Eric T. Johnson --- web/js/proof-of-work-slow.mjs | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/web/js/proof-of-work-slow.mjs b/web/js/proof-of-work-slow.mjs index a1be6ea..69ef5a8 100644 --- a/web/js/proof-of-work-slow.mjs +++ b/web/js/proof-of-work-slow.mjs @@ -70,7 +70,7 @@ function processTask() { let hash; let nonce = 0; do { - if (nonce & (1023 === 0)) { + if ((nonce & 1023) === 0) { postMessage(nonce); } hash = await sha256(data + nonce++);