Skip to content

Commit f3a4ab9

Browse files
authoredMar 6, 2024
Fix worker coreURL for ESM (#657)
1 parent 2c2e2e2 commit f3a4ab9

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed
 

‎packages/ffmpeg/src/worker.ts

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@ const load = async ({
5454
// when web worker type is `classic`.
5555
importScripts(_coreURL);
5656
} catch {
57-
if (!_coreURL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
57+
if (!_coreURL || _coreURL === CORE_URL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
5858
// when web worker type is `module`.
5959
(self as WorkerGlobalScope).createFFmpegCore = (
6060
(await import(

0 commit comments

Comments
 (0)