diff --git a/src/lib/is-browser.ts b/src/lib/is-browser.ts index 279fd825b..fe69ce650 100644 --- a/src/lib/is-browser.ts +++ b/src/lib/is-browser.ts @@ -1,6 +1,6 @@ const isBrowser = (typeof window !== 'undefined' && typeof window.document !== 'undefined') || // eslint-disable-next-line no-restricted-globals - (typeof self !== 'undefined' && typeof self.postMessage === 'function') // is web worker - + (typeof self !== 'undefined' && typeof self.postMessage === 'function') || // is web worker + (typeof navigator !== 'undefined' && navigator.product === 'ReactNative') // while navigator.product is deprecated export default isBrowser