We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent cc48d45 commit f6123f2Copy full SHA for f6123f2
src/lib/is-browser.ts
@@ -1,6 +1,6 @@
1
const isBrowser =
2
(typeof window !== 'undefined' && typeof window.document !== 'undefined') ||
3
// eslint-disable-next-line no-restricted-globals
4
- (typeof self !== 'undefined' && typeof self.postMessage === 'function') // is web worker
5
-
+ (typeof self !== 'undefined' && typeof self.postMessage === 'function') || // is web worker
+ (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') // while navigator.product is deprecated
6
export default isBrowser
0 commit comments