Skip to content

Commit 8e267a7

Browse files
authored
fix: prevent access to the window object in the node (fix #48) (#49)
1 parent af4d3d9 commit 8e267a7

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

browser/browser.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ var browser = {
4040
version: 0
4141
};
4242

43-
if (window && window.navigator) {
43+
if (typeof window !== 'undefined' && window.navigator) {
4444
detectBrowser();
4545
}
4646

0 commit comments

Comments
 (0)