Skip to content

Commit

Permalink
Revert "feat: add compatibility with txiki.js (mqttjs#1895)"
Browse files Browse the repository at this point in the history
This reverts commit 37b08c9.
Not special support for txiki.js is required thanks to forceNativeWebSocket client option
  • Loading branch information
EmixamPP committed Jul 25, 2024
1 parent 6837093 commit d4d3d4b
Showing 1 changed file with 1 addition and 7 deletions.
8 changes: 1 addition & 7 deletions src/lib/is-browser.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,6 @@ const isStandardBrowserEnv = () => {
return false
}

const isTxikijsEnv = () =>
typeof navigator !== 'undefined' && navigator.userAgent === 'txiki.js'

const isWebWorkerEnv = () =>
Boolean(
// eslint-disable-next-line no-restricted-globals
Expand All @@ -40,10 +37,7 @@ const isReactNativeEnv = () =>
typeof navigator !== 'undefined' && navigator.product === 'ReactNative'

const isBrowser =
isStandardBrowserEnv() ||
isWebWorkerEnv() ||
isReactNativeEnv() ||
isTxikijsEnv()
isStandardBrowserEnv() || isWebWorkerEnv() || isReactNativeEnv()

export const isWebWorker = isWebWorkerEnv()

Expand Down

0 comments on commit d4d3d4b

Please sign in to comment.