From 183b35aa3ed98fbbcbea6805994ef7c3cc8ee616 Mon Sep 17 00:00:00 2001 From: Daniel Lando Date: Wed, 16 Aug 2023 14:13:40 +0200 Subject: [PATCH] fix: browser detection Fixes #1671 --- src/lib/is-browser.ts | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/src/lib/is-browser.ts b/src/lib/is-browser.ts index 3a6011a04..8c091771c 100644 --- a/src/lib/is-browser.ts +++ b/src/lib/is-browser.ts @@ -1,12 +1,4 @@ -const legacyIsBrowser = - (typeof process !== 'undefined' && process.title === 'browser') || - // eslint-disable-next-line camelcase, @typescript-eslint/ban-ts-comment - // @ts-ignore - typeof __webpack_require__ === 'function' - const isBrowser = - typeof window !== 'undefined' && typeof document !== 'undefined' - -const IS_BROWSER = isBrowser || legacyIsBrowser + typeof window !== 'undefined' && typeof window.document !== 'undefined' -export default IS_BROWSER +export default isBrowser