Skip to content

Commit

Permalink
Fix ERR_INVALID_ARG_TYPE on Node.js nightly (josdejong#230)
Browse files Browse the repository at this point in the history
# Conflicts:
#	src/WorkerHandler.js
  • Loading branch information
aduh95 authored and mansona committed Jun 16, 2021
1 parent fdbf978 commit 5c40902
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions lib/WorkerHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,8 +171,9 @@ function WorkerHandler(script, options) {
// send all queued requests to worker
function dispatchQueuedRequests()
{
me.requestQueue.forEach(me.worker.send.bind(me.worker));
me.requestQueue = [];
for(const request of me.requestQueue.splice(0)) {
me.worker.send(request);
}
}

// listen for worker messages error and exit
Expand Down

0 comments on commit 5c40902

Please sign in to comment.