Skip to content

Commit d5b0c3c

Browse files
authored
Merge pull request #2 from swansontec/patch-1
Do not set isNode to true under bundlers
2 parents 0095f0b + f4ad53f commit d5b0c3c

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/index.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,10 @@
22

33
const isBrowser = typeof window !== 'undefined' && typeof window.document !== 'undefined';
44

5-
const isNode = typeof module !== 'undefined' && typeof module.exports !== 'undefined';
5+
const isNode =
6+
typeof process !== 'undefined' &&
7+
process.versions != null &&
8+
process.versions.node != null;
69

710
export {
811
isBrowser,

0 commit comments

Comments
 (0)