Skip to content

Commit 48e435f

Browse files
jeanp413alexdima
authored andcommitted
1 parent ed2619e commit 48e435f

File tree

1 file changed

+4
-6
lines changed

1 file changed

+4
-6
lines changed

src/bootstrap.js

Lines changed: 4 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,12 @@
2828
// increase number of stack frames(from 10, https://github.com/v8/v8/wiki/Stack-Trace-API)
2929
Error.stackTraceLimit = 100;
3030

31-
if (!process.env['VSCODE_HANDLES_SIGPIPE']) {
31+
if (typeof process !== 'undefined' && !process.env['VSCODE_HANDLES_SIGPIPE']) {
3232
// Workaround for Electron not installing a handler to ignore SIGPIPE
3333
// (https://github.com/electron/electron/issues/13254)
34-
if (typeof process !== 'undefined') {
35-
process.on('SIGPIPE', () => {
36-
console.error(new Error('Unexpected SIGPIPE'));
37-
});
38-
}
34+
process.on('SIGPIPE', () => {
35+
console.error(new Error('Unexpected SIGPIPE'));
36+
});
3937
}
4038

4139
//#endregion

0 commit comments

Comments
 (0)