Update spawnWorker.js

This commit is contained in:
jeromewu
2020-03-12 17:17:39 +08:00
committed by GitHub
parent c81a451280
commit 209737ed1d

View File

@@ -10,7 +10,7 @@ module.exports = ({ workerPath, workerBlobURL }) => {
if (Blob && URL && workerBlobURL) {
/* Use Blob to load cross domain worker script */
const blob = new Blob([`importScripts("${workerPath}");`], {
type: 'application/javascript',
type: 'text/javascript',
});
worker = new Worker(URL.createObjectURL(blob));
} else {