Skip to content

Commit 38c5bbe

Browse files
authored
Merge pull request #1 from ShongSu/ShongSu-patch-1
make it works on React Native
2 parents 6bb07f7 + d250c87 commit 38c5bbe

1 file changed

Lines changed: 1 addition & 1 deletion

File tree

src/browser.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ function useColors() {
4040
// NB: In an Electron preload script, document will be defined but not fully
4141
// initialized. Since we know we're in Chrome, we'll just detect this case
4242
// explicitly
43-
if (window && window.process && window.process.type === 'renderer') {
43+
if (window && window.process && window.process.type === 'renderer' || !window.document) {
4444
return true;
4545
}
4646

0 commit comments

Comments
 (0)