webworker handle() should specifically not be an async function
This commit is contained in:
parent
8548784d45
commit
df06d07437
|
@ -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() };
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue