Skip to content

Commit

Permalink
fix: make browser detection more reliable (#768)
Browse files Browse the repository at this point in the history
Some implementations of server-side rendering support `window` and `document` objects but `navigator` could be undefined. To prevent error-prone behavior we should check the existence of `navigator` object in global scope.
  • Loading branch information
mrzepinski authored and FezVrasta committed Apr 22, 2019
1 parent e215666 commit f8f69b0
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion packages/popper/src/utils/isBrowser.js
@@ -1 +1 @@
export default typeof window !== 'undefined' && typeof document !== 'undefined';
export default typeof window !== 'undefined' && typeof document !== 'undefined' && typeof navigator !== 'undefined';

0 comments on commit f8f69b0

Please sign in to comment.