Update challenge to skip undefined worker answers

This commit is contained in:
Thomas Lynch
2024-08-18 19:51:38 +10:00
parent f1d827f3b3
commit 90df19cbed
2 changed files with 4 additions and 1 deletions

View File

@ -218,6 +218,9 @@ const powFinished = new Promise((resolve) => {
}
if (finished) return;
const [workerId, answer] = e.data;
if (!answer) {
return console.warn("Worker", workerId, "Returned with undefined answer");
}
console.log(
"Worker",
workerId,

File diff suppressed because one or more lines are too long