fix(web/js): broken progress bar with slow algo (#673)

This was revealed by the reformat in #546.

Signed-off-by: Eric T. Johnson <yut23@users.noreply.github.com>
This commit is contained in:
Eric T. Johnson 2025-06-22 20:05:37 -04:00 committed by GitHub
parent 4c74934e9f
commit 060b10ea2d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -70,7 +70,7 @@ function processTask() {
let hash; let hash;
let nonce = 0; let nonce = 0;
do { do {
if (nonce & (1023 === 0)) { if ((nonce & 1023) === 0) {
postMessage(nonce); postMessage(nonce);
} }
hash = await sha256(data + nonce++); hash = await sha256(data + nonce++);