We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 5a84c36 commit 7578d65Copy full SHA for 7578d65
src/proxyClient.js
@@ -18,14 +18,7 @@
18
#if ENVIRONMENT_MAY_BE_NODE
19
var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
20
if (ENVIRONMENT_IS_NODE) {
21
- let nodeWorkerThreads;
22
- try {
23
- nodeWorkerThreads = require('worker_threads');
24
- } catch (e) {
25
- console.error('The "worker_threads" module is not supported in this node.js build - perhaps a newer version is needed?');
26
- throw e;
27
- }
28
- global.Worker = nodeWorkerThreads.Worker;
+ global.Worker = require('worker_threads').Worker;
29
var Module = Module || {}
30
} else
31
#endif
0 commit comments