Skip to content

Commit

Permalink
Fix crash from undefined method when running under Deno 2
Browse files Browse the repository at this point in the history
  • Loading branch information
mikuso committed Nov 28, 2024
1 parent 714ec39 commit fb77b3d
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/transports/IPCTransport.ts
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ export class IPCTransport extends EventEmitter2 implements Transport {
this.autoExitHandle = setInterval(() => {
let currentProcess: any = (cluster.isWorker) ? cluster.worker.process : process

if (currentProcess._getActiveHandles().length === 3) {
if (typeof currentProcess._getActiveHandles === 'function' && currentProcess._getActiveHandles().length === 3) {
let handlers: any = currentProcess._getActiveHandles().map(h => h.constructor.name)

if (handlers.includes('Pipe') === true &&
Expand Down

0 comments on commit fb77b3d

Please sign in to comment.