Skip to content

Commit 2c364b8

Browse files
author
chenm
committed
A little problem with assigning value to 'coreURL'
1 parent e9e314b commit 2c364b8

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

packages/ffmpeg/src/worker.ts

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -50,9 +50,11 @@ const load = async ({
5050
const first = !ffmpeg;
5151

5252
try {
53-
if (!_coreURL) _coreURL = CORE_URL;
53+
let tempCoreURL = _coreURL;
54+
if (!tempCoreURL) tempCoreURL = CORE_URL;
5455
// when web worker type is `classic`.
55-
importScripts(_coreURL);
56+
importScripts(tempCoreURL);
57+
_coreURL = tempCoreURL;
5658
} catch {
5759
if (!_coreURL) _coreURL = CORE_URL.replace('/umd/', '/esm/');
5860
// when web worker type is `module`.

0 commit comments

Comments
 (0)