File tree 1 file changed +5
-1
lines changed 1 file changed +5
-1
lines changed Original file line number Diff line number Diff line change @@ -21,6 +21,10 @@ function isInBrowser() {
21
21
return ( ( typeof window !== 'undefined' ) && ( typeof XMLHttpRequest === 'function' ) ) ;
22
22
}
23
23
24
+ function hasGlobalProcess ( ) {
25
+ return ( ( typeof process === 'object' ) && ( process !== null ) && ( typeof process . on === 'function' ) ) ;
26
+ }
27
+
24
28
function retrieveFile ( path ) {
25
29
// Trim the path to make sure there is no extra whitespace.
26
30
path = path . trim ( ) ;
@@ -418,7 +422,7 @@ exports.install = function(options) {
418
422
// exception handler and the process will still be terminated. However, the
419
423
// generated JavaScript code will be shown above the stack trace instead of
420
424
// the original source code.
421
- if ( installHandler && ! isInBrowser ( ) ) {
425
+ if ( installHandler && hasGlobalProcess ( ) ) {
422
426
shimEmitUncaughtException ( ) ;
423
427
}
424
428
}
You can’t perform that action at this time.
0 commit comments