summaryrefslogtreecommitdiff
path: root/ext/node/polyfills/worker_threads.ts
diff options
context:
space:
mode:
Diffstat (limited to 'ext/node/polyfills/worker_threads.ts')
-rw-r--r--ext/node/polyfills/worker_threads.ts3
1 files changed, 2 insertions, 1 deletions
diff --git a/ext/node/polyfills/worker_threads.ts b/ext/node/polyfills/worker_threads.ts
index 15b51aeb4..4563f157f 100644
--- a/ext/node/polyfills/worker_threads.ts
+++ b/ext/node/polyfills/worker_threads.ts
@@ -211,6 +211,7 @@ class NodeWorker extends EventEmitter {
permissions: null,
name: this.#name,
workerType: "module",
+ closeOnIdle: true,
},
serializedWorkerMetadata,
);
@@ -413,7 +414,7 @@ internals.__initWorkerThreads = (
>();
parentPort = self as ParentPort;
- if (typeof maybeWorkerMetadata !== "undefined") {
+ if (maybeWorkerMetadata) {
const { 0: metadata, 1: _ } = maybeWorkerMetadata;
workerData = metadata.workerData;
environmentData = metadata.environmentData;