diff --git a/src/workerHelpers.no-bundler.js b/src/workerHelpers.no-bundler.js index 8b84a14..231e5c5 100644 --- a/src/workerHelpers.no-bundler.js +++ b/src/workerHelpers.no-bundler.js @@ -17,7 +17,7 @@ function waitForMsgType(target, type) { return new Promise(resolve => { target.addEventListener('message', function onMsg({ data }) { - if (data == null || data.type !== type) return; + if (data?.type !== type) return; target.removeEventListener('message', onMsg); resolve(data); });