Close worker on crash

This commit is contained in:
portree_kid 2020-03-29 14:58:25 +02:00
parent 41463dedff
commit c7ebaccb3f

View File

@ -30,6 +30,7 @@ onmessage = function (event) {
).catch(result => {
console.log('Crashed');
console.log(result);
postMessage('DONE');
});
} else if (event.data[0] === 'scanai') {
scanai(event.data[1]).then(result => {
@ -40,6 +41,7 @@ onmessage = function (event) {
).catch(result => {
console.log('Crashed');
console.log(result);
postMessage('DONE');
});
}
else if (event.data[0] === 'scanapt') {
@ -51,6 +53,7 @@ onmessage = function (event) {
).catch(result => {
console.log('Crashed');
console.log(result);
postMessage('DONE');
});
}