Skip to content

Commit

Permalink
fix(createWebWorkerPromise): revoke revokeObjectURL
Browse files Browse the repository at this point in the history
Addresses:

  blob:http://localhost:5173/e8a4572c-e8e3-4174-916d-f90930010413	(failed)net::ERR_FILE_NOT_FOUND	script	Other

with local development of derived apps.
  • Loading branch information
thewtex committed Oct 29, 2023
1 parent 16302b7 commit 3084ebb
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions src/core/createWebWorkerPromise.ts
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ async function createWebWorkerPromise (existingWorker: Worker | null, pipelineWo
const response = await axios.get(`${webWorkerString}/bundles/pipeline.${min}worker.js`, { responseType: 'blob' })
const workerObjectUrl = URL.createObjectURL(response.data as Blob)
worker = new Worker(workerObjectUrl, { type: 'module' })
URL.revokeObjectURL(workerObjectUrl)
} else {
worker = new Worker(`${webWorkerString}/bundles/pipeline.${min}worker.js`, { type: 'module' })
}
Expand All @@ -57,7 +56,6 @@ async function createWebWorkerPromise (existingWorker: Worker | null, pipelineWo
const response = await axios.get(workerUrl, { responseType: 'blob' })
const workerObjectUrl = URL.createObjectURL(response.data as Blob)
worker = new Worker(workerObjectUrl, { type: 'module' })
URL.revokeObjectURL(workerObjectUrl)
} else {
worker = new Worker(workerUrl, { type: 'module' })
}
Expand Down

0 comments on commit 3084ebb

Please sign in to comment.