mirror of
https://github.com/debug-js/debug.git
synced 2026-01-18 16:12:38 +00:00
Merge pull request #387 from kribblo/patch-1
Use typeof window.process !== 'undefined'
This commit is contained in:
commit
a16cf42885
@ -40,7 +40,7 @@ function useColors() {
|
||||
// NB: In an Electron preload script, document will be defined but not fully
|
||||
// initialized. Since we know we're in Chrome, we'll just detect this case
|
||||
// explicitly
|
||||
if (typeof window !== 'undefined' && 'process' in window && window.process.type === 'renderer') {
|
||||
if (typeof window !== 'undefined' && typeof window.process !== 'undefined' && window.process.type === 'renderer') {
|
||||
return true;
|
||||
}
|
||||
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user