There was an error while loading. Please reload this page.
2 parents 6bb07f7 + d250c87 commit 38c5bbeCopy full SHA for 38c5bbe
1 file changed
src/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 (window && window.process && window.process.type === 'renderer') {
+ if (window && window.process && window.process.type === 'renderer' || !window.document) {
44
return true;
45
}
46
0 commit comments