Skip to content

Commit

Permalink
Fix worker coreURL for ESM (#657)
Browse files Browse the repository at this point in the history
  • Loading branch information
dchristensen authored Mar 6, 2024
1 parent 2c2e2e2 commit f3a4ab9
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/ffmpeg/src/worker.ts
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ const load = async ({
// when web worker type is `classic`.
importScripts(_coreURL);
} catch {
if (!_coreURL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
if (!_coreURL || _coreURL === CORE_URL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
// when web worker type is `module`.
(self as WorkerGlobalScope).createFFmpegCore = (
(await import(
Expand Down

0 comments on commit f3a4ab9

Please sign in to comment.