Skip to content

Commit

Permalink
fix: allow for nesting workers (#40)
Browse files Browse the repository at this point in the history
  • Loading branch information
eshaz committed Jan 4, 2024
1 parent 29fef97 commit 683e5f4
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions node.js
Original file line number Diff line number Diff line change
Expand Up @@ -133,6 +133,7 @@ function mainThread() {

function workerThread() {
let { mod, name, type } = threads.workerData;
if (!mod) return mainThread();

// turn global into a mock WorkerGlobalScope
const self = global.self = global;
Expand Down

0 comments on commit 683e5f4

Please sign in to comment.