Skip to content

Commit 7578d65

Browse files
authored
Remove unneeded try/catch. NFC (#21047)
Should have been included in #21045
1 parent 5a84c36 commit 7578d65

File tree

1 file changed

+1
-8
lines changed

1 file changed

+1
-8
lines changed

src/proxyClient.js

+1-8
Original file line numberDiff line numberDiff line change
@@ -18,14 +18,7 @@
1818
#if ENVIRONMENT_MAY_BE_NODE
1919
var ENVIRONMENT_IS_NODE = typeof process == 'object' && typeof process.versions == 'object' && typeof process.versions.node == 'string';
2020
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;
21+
global.Worker = require('worker_threads').Worker;
2922
var Module = Module || {}
3023
} else
3124
#endif

0 commit comments

Comments
 (0)