Skip to content

Commit 1c10c8b

Browse files
committed
Removed window type guard in createFFmpeg.js
1 parent 13d84f1 commit 1c10c8b

File tree

1 file changed

+7
-10
lines changed

1 file changed

+7
-10
lines changed

src/createFFmpeg.js

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -75,17 +75,14 @@ module.exports = (_options = {}) => {
7575
* as we are using blob URL instead of original URL to avoid cross origin issues.
7676
*/
7777
locateFile: (path, prefix) => {
78-
if (typeof window !== 'undefined') {
79-
if (typeof wasmPath !== 'undefined'
80-
&& path.endsWith('ffmpeg-core.wasm')) {
81-
return wasmPath;
82-
}
83-
if (typeof workerPath !== 'undefined'
84-
&& path.endsWith('ffmpeg-core.worker.js')) {
85-
return workerPath;
86-
}
78+
if (typeof wasmPath !== 'undefined'
79+
&& path.endsWith('ffmpeg-core.wasm')) {
80+
return wasmPath;
81+
}
82+
if (typeof workerPath !== 'undefined'
83+
&& path.endsWith('ffmpeg-core.worker.js')) {
84+
return workerPath;
8785
}
88-
return prefix + path;
8986
},
9087
});
9188
ffmpeg = Core.cwrap('proxy_main', 'number', ['number', 'number']);

0 commit comments

Comments
 (0)