webworker handle() should specifically not be an async function

This commit is contained in:
milo 2024-03-09 22:04:04 -05:00
parent 8548784d45
commit df06d07437
1 changed files with 2 additions and 2 deletions

View File

@ -7,7 +7,7 @@ import {
let initPromise = init('/blockfish.wasm');
async function handle(msg) {
function handle(msg) {
switch (msg.type) {
case 'init':
{
@ -37,7 +37,7 @@ self.addEventListener('message', async e => {
let resp;
try {
resp = await handle(e.data);
resp = handle(e.data);
} catch (e) {
resp = { error: e.toString() };
}