Skip to content

Commit 0d38301

Browse files
authored
Merge pull request #8 from eventengineering/bugfix/process-override
Fix the global.process issue in TcpSocket.js while preserving debugging
2 parents 798737a + 5c22e37 commit 0d38301

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

TcpSocket.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,10 @@
88

99
'use strict';
1010

11-
global.process = global.process || require('process'); // needed to make stream-browserify happy
11+
if(!(global.process && global.process.nextTick)){
12+
global.process = require('process'); // needed to make stream-browserify happy
13+
}
14+
1215
var Buffer = global.Buffer = global.Buffer || require('buffer').Buffer;
1316

1417
var util = require('util');

0 commit comments

Comments
 (0)