We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
2 parents 6e934e9 + 408ae94 commit a16cf42Copy full SHA for a16cf42
browser.js
@@ -40,7 +40,7 @@ function useColors() {
40
// NB: In an Electron preload script, document will be defined but not fully
41
// initialized. Since we know we're in Chrome, we'll just detect this case
42
// explicitly
43
- if (typeof window !== 'undefined' && 'process' in window && window.process.type === 'renderer') {
+ if (typeof window !== 'undefined' && typeof window.process !== 'undefined' && window.process.type === 'renderer') {
44
return true;
45
}
46
0 commit comments